llvm.org GIT mirror llvm / 597f22f
new testcase git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21016 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 15 years ago
2 changed file(s) with 36 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 ; RUN: llvm-as < %s | llc
1
2 double %fneg(double %X) {
3 %Y = sub double -0.0, %X
4 ret double %Y
5 }
6
7 float %fnegf(float %X) {
8 %Y = sub float -0.0, %X
9 ret float %Y
10 }
11
12 declare double %fabs(double)
13 declare float %fabsf(float)
14
15
16 double %fabstest(double %X) {
17 %Y = call double %fabs(double %X)
18 ret double %Y
19 }
20
21 float %fabsftest(float %X) {
22 %Y = call float %fabsf(float %X)
23 ret float %Y
24 }
25
0 ; Make sure this testcase codegens to the fabs instruction, not a call to fabsf
1 ; RUN: llvm-as < %s | llc -disable-pattern-isel=0 | grep 'fabs$'
2
3 declare float %fabsf(float)
4
5 float %fabsftest(float %X) {
6 %Y = call float %fabsf(float %X)
7 ret float %Y
8 }
9