summaryrefslogtreecommitdiff
path: root/test/Transforms
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2017-12-30 03:13:00 +0000
committerPhilip Reames <listmail@philipreames.com>2017-12-30 03:13:00 +0000
commitbed272c473cff1a6d2bf72361cda36810df2877f (patch)
treed0eaad83eb5cd5d338f75bfb7e45407c15feb03b /test/Transforms
parent39064346e3aacae955af4d51bd483f773a05e3b9 (diff)
Move tests associated with transforms moved in r321467
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@321572 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/InstCombine/bswap-fold.ll10
-rw-r--r--test/Transforms/InstCombine/intrinsics.ll8
-rw-r--r--test/Transforms/InstSimplify/bitreverse-fold.ll (renamed from test/Transforms/InstCombine/bitreverse-fold.ll)2
-rw-r--r--test/Transforms/InstSimplify/fold-intrinsics.ll27
4 files changed, 28 insertions, 19 deletions
diff --git a/test/Transforms/InstCombine/bswap-fold.ll b/test/Transforms/InstCombine/bswap-fold.ll
index 260e2330996..8fdecb628b8 100644
--- a/test/Transforms/InstCombine/bswap-fold.ll
+++ b/test/Transforms/InstCombine/bswap-fold.ll
@@ -13,16 +13,6 @@ define i32 @test4(i32 %a) nounwind {
ret i32 %tmp4
}
-; A
-define i32 @test5(i32 %a) nounwind {
-; CHECK-LABEL: @test5(
-; CHECK-NEXT: ret i32 %a
-;
- %tmp2 = tail call i32 @llvm.bswap.i32( i32 %a )
- %tmp4 = tail call i32 @llvm.bswap.i32( i32 %tmp2 )
- ret i32 %tmp4
-}
-
; a >> 24
define i32 @test6(i32 %a) nounwind {
; CHECK-LABEL: @test6(
diff --git a/test/Transforms/InstCombine/intrinsics.ll b/test/Transforms/InstCombine/intrinsics.ll
index e0698f8b3b7..73f1cd92016 100644
--- a/test/Transforms/InstCombine/intrinsics.ll
+++ b/test/Transforms/InstCombine/intrinsics.ll
@@ -262,20 +262,12 @@ define void @powi(double %V, double *%P) {
%A = tail call double @llvm.powi.f64(double %V, i32 -1) nounwind
store volatile double %A, double* %P
- %B = tail call double @llvm.powi.f64(double %V, i32 0) nounwind
- store volatile double %B, double* %P
-
- %C = tail call double @llvm.powi.f64(double %V, i32 1) nounwind
- store volatile double %C, double* %P
-
%D = tail call double @llvm.powi.f64(double %V, i32 2) nounwind
store volatile double %D, double* %P
ret void
; CHECK-LABEL: @powi(
; CHECK: %A = fdiv double 1.0{{.*}}, %V
; CHECK: store volatile double %A,
-; CHECK: store volatile double 1.0
-; CHECK: store volatile double %V
; CHECK: %D = fmul double %V, %V
; CHECK: store volatile double %D
}
diff --git a/test/Transforms/InstCombine/bitreverse-fold.ll b/test/Transforms/InstSimplify/bitreverse-fold.ll
index b798ad33b3f..eab4b07a16e 100644
--- a/test/Transforms/InstCombine/bitreverse-fold.ll
+++ b/test/Transforms/InstSimplify/bitreverse-fold.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -instcombine -S | FileCheck %s
+; RUN: opt < %s -instsimplify -S | FileCheck %s
define i32 @identity_bitreverse_i32(i32 %p) {
; CHECK-LABEL: @identity_bitreverse_i32(
diff --git a/test/Transforms/InstSimplify/fold-intrinsics.ll b/test/Transforms/InstSimplify/fold-intrinsics.ll
new file mode 100644
index 00000000000..e484704e8a7
--- /dev/null
+++ b/test/Transforms/InstSimplify/fold-intrinsics.ll
@@ -0,0 +1,27 @@
+; RUN: opt < %s -instsimplify -S | FileCheck %s
+
+declare double @llvm.powi.f64(double, i32) nounwind readonly
+declare i32 @llvm.bswap.i32(i32)
+
+; A
+define i32 @test_bswap(i32 %a) nounwind {
+; CHECK-LABEL: @test_bswap(
+; CHECK-NEXT: ret i32 %a
+;
+ %tmp2 = tail call i32 @llvm.bswap.i32( i32 %a )
+ %tmp4 = tail call i32 @llvm.bswap.i32( i32 %tmp2 )
+ ret i32 %tmp4
+}
+
+define void @powi(double %V, double *%P) {
+ %B = tail call double @llvm.powi.f64(double %V, i32 0) nounwind
+ store volatile double %B, double* %P
+
+ %C = tail call double @llvm.powi.f64(double %V, i32 1) nounwind
+ store volatile double %C, double* %P
+
+ ret void
+; CHECK-LABEL: @powi(
+; CHECK: store volatile double 1.0
+; CHECK: store volatile double %V
+}