aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/InstCombine/intrinsics.ll16
1 files changed, 14 insertions, 2 deletions
diff --git a/test/Transforms/InstCombine/intrinsics.ll b/test/Transforms/InstCombine/intrinsics.ll
index f334b3b..6bfea72 100644
--- a/test/Transforms/InstCombine/intrinsics.ll
+++ b/test/Transforms/InstCombine/intrinsics.ll
@@ -152,8 +152,8 @@ entry:
ret void
; CHECK: @powi
; CHECK: %A = fdiv double 1.0{{.*}}, %V
-; CHECK: store volatile double %A,
-; CHECK: store volatile double 1.0
+; CHECK: store volatile double %A,
+; CHECK: store volatile double 1.0
; CHECK: store volatile double %V
}
@@ -256,3 +256,15 @@ define i32 @cttz_select(i32 %Value) nounwind {
; CHECK: @cttz_select
; CHECK: select i1 %tobool, i32 %cttz, i32 32
}
+
+; Test that SimplifyCall is getting invoked by InstCombine
+declare float @llvm.fabs.f32(float) nounwind readnone
+define float @simplify_idempotent(float %a) {
+; CHECK: @simplify_idempotent
+; CHECK: fabs
+; CHECK-NOT: fabs
+ %a0 = call float @llvm.fabs.f32(float %a)
+ %a1 = call float @llvm.fabs.f32(float %a0)
+
+ ret float %a1
+} \ No newline at end of file