1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
| ; fsqrt should be generated when the fsqrt feature is enabled, but not
; otherwise.
; 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
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
}
|