CodeGen peephole: fold redundant phys reg copies
[oota-llvm.git] / test / CodeGen / X86 / rounding-ops.ll
index 51fcf6418429dcd8897442942ff4f97ec5050c11..15a11d1d6a9620aefbde8ef7bdcaa2cb558f760e 100644 (file)
@@ -1,15 +1,15 @@
-; RUN: llc < %s -mtriple=x86_64-apple-macosx -mattr=+sse41 | FileCheck -check-prefix=CHECK-SSE %s
+; RUN: llc < %s -mtriple=x86_64-apple-macosx -mattr=+sse4.1 | FileCheck -check-prefix=CHECK-SSE %s
 ; RUN: llc < %s -mtriple=x86_64-apple-macosx -mattr=+avx | FileCheck -check-prefix=CHECK-AVX %s
 
 define float @test1(float %x) nounwind  {
   %call = tail call float @floorf(float %x) nounwind readnone
   ret float %call
 
-; CHECK-SSE: test1:
-; CHECK-SSE: roundss $1
+; CHECK-SSE-LABEL: test1:
+; CHECK-SSE: roundss $9
 
-; CHECK-AVX: test1:
-; CHECK-AVX: vroundss $1
+; CHECK-AVX-LABEL: test1:
+; CHECK-AVX: vroundss $9
 }
 
 declare float @floorf(float) nounwind readnone
@@ -18,11 +18,11 @@ define double @test2(double %x) nounwind  {
   %call = tail call double @floor(double %x) nounwind readnone
   ret double %call
 
-; CHECK-SSE: test2:
-; CHECK-SSE: roundsd $1
+; CHECK-SSE-LABEL: test2:
+; CHECK-SSE: roundsd $9
 
-; CHECK-AVX: test2:
-; CHECK-AVX: vroundsd $1
+; CHECK-AVX-LABEL: test2:
+; CHECK-AVX: vroundsd $9
 }
 
 declare double @floor(double) nounwind readnone
@@ -31,10 +31,10 @@ define float @test3(float %x) nounwind  {
   %call = tail call float @nearbyintf(float %x) nounwind readnone
   ret float %call
 
-; CHECK-SSE: test3:
+; CHECK-SSE-LABEL: test3:
 ; CHECK-SSE: roundss $12
 
-; CHECK-AVX: test3:
+; CHECK-AVX-LABEL: test3:
 ; CHECK-AVX: vroundss $12
 }
 
@@ -44,10 +44,10 @@ define double @test4(double %x) nounwind  {
   %call = tail call double @nearbyint(double %x) nounwind readnone
   ret double %call
 
-; CHECK-SSE: test4:
+; CHECK-SSE-LABEL: test4:
 ; CHECK-SSE: roundsd $12
 
-; CHECK-AVX: test4:
+; CHECK-AVX-LABEL: test4:
 ; CHECK-AVX: vroundsd $12
 }
 
@@ -57,11 +57,11 @@ define float @test5(float %x) nounwind  {
   %call = tail call float @ceilf(float %x) nounwind readnone
   ret float %call
 
-; CHECK-SSE: test5:
-; CHECK-SSE: roundss $2
+; CHECK-SSE-LABEL: test5:
+; CHECK-SSE: roundss $10
 
-; CHECK-AVX: test5:
-; CHECK-AVX: vroundss $2
+; CHECK-AVX-LABEL: test5:
+; CHECK-AVX: vroundss $10
 }
 
 declare float @ceilf(float) nounwind readnone
@@ -70,11 +70,11 @@ define double @test6(double %x) nounwind  {
   %call = tail call double @ceil(double %x) nounwind readnone
   ret double %call
 
-; CHECK-SSE: test6:
-; CHECK-SSE: roundsd $2
+; CHECK-SSE-LABEL: test6:
+; CHECK-SSE: roundsd $10
 
-; CHECK-AVX: test6:
-; CHECK-AVX: vroundsd $2
+; CHECK-AVX-LABEL: test6:
+; CHECK-AVX: vroundsd $10
 }
 
 declare double @ceil(double) nounwind readnone
@@ -83,10 +83,10 @@ define float @test7(float %x) nounwind  {
   %call = tail call float @rintf(float %x) nounwind readnone
   ret float %call
 
-; CHECK-SSE: test7:
+; CHECK-SSE-LABEL: test7:
 ; CHECK-SSE: roundss $4
 
-; CHECK-AVX: test7:
+; CHECK-AVX-LABEL: test7:
 ; CHECK-AVX: vroundss $4
 }
 
@@ -96,10 +96,10 @@ define double @test8(double %x) nounwind  {
   %call = tail call double @rint(double %x) nounwind readnone
   ret double %call
 
-; CHECK-SSE: test8:
+; CHECK-SSE-LABEL: test8:
 ; CHECK-SSE: roundsd $4
 
-; CHECK-AVX: test8:
+; CHECK-AVX-LABEL: test8:
 ; CHECK-AVX: vroundsd $4
 }
 
@@ -109,11 +109,11 @@ define float @test9(float %x) nounwind  {
   %call = tail call float @truncf(float %x) nounwind readnone
   ret float %call
 
-; CHECK-SSE: test9:
-; CHECK-SSE: roundss $3
+; CHECK-SSE-LABEL: test9:
+; CHECK-SSE: roundss $11
 
-; CHECK-AVX: test9:
-; CHECK-AVX: vroundss $3
+; CHECK-AVX-LABEL: test9:
+; CHECK-AVX: vroundss $11
 }
 
 declare float @truncf(float) nounwind readnone
@@ -122,11 +122,11 @@ define double @test10(double %x) nounwind  {
   %call = tail call double @trunc(double %x) nounwind readnone
   ret double %call
 
-; CHECK-SSE: test10:
-; CHECK-SSE: roundsd $3
+; CHECK-SSE-LABEL: test10:
+; CHECK-SSE: roundsd $11
 
-; CHECK-AVX: test10:
-; CHECK-AVX: vroundsd $3
+; CHECK-AVX-LABEL: test10:
+; CHECK-AVX: vroundsd $11
 }
 
 declare double @trunc(double) nounwind readnone