2005-09-03 02:32:22 +08:00
|
|
|
; fsqrt should be generated when the fsqrt feature is enabled, but not
|
|
|
|
; otherwise.
|
|
|
|
|
2018-08-28 09:18:29 +08:00
|
|
|
; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=powerpc-unknown-linux-gnu -mattr=+fsqrt | FileCheck %s -check-prefix=SQRT
|
|
|
|
; RUN: llc -verify-machineinstrs < %s -mattr=-vsx -mtriple=powerpc-unknown-linux-gnu -mattr=-fsqrt | FileCheck %s -check-prefix=NSQRT
|
|
|
|
|
|
|
|
; SQRT: X:
|
|
|
|
; SQRT: fsqrt 1, 1
|
|
|
|
; SQRT: blr
|
|
|
|
|
|
|
|
; NSQRT: X:
|
|
|
|
; NSQRT-NOT: fsqrt 1, 1
|
|
|
|
; NSQRT: blr
|
2005-09-03 02:32:22 +08:00
|
|
|
|
2008-02-19 16:07:33 +08:00
|
|
|
declare double @llvm.sqrt.f64(double)
|
|
|
|
|
|
|
|
define double @X(double %Y) {
|
|
|
|
%Z = call double @llvm.sqrt.f64( double %Y ) ; <double> [#uses=1]
|
|
|
|
ret double %Z
|
2005-09-03 02:32:22 +08:00
|
|
|
}
|
2008-02-19 16:07:33 +08:00
|
|
|
|