diff options
author | Michael Ilseman <milseman@apple.com> | 2013-02-07 23:01:35 +0000 |
---|---|---|
committer | Michael Ilseman <milseman@apple.com> | 2013-02-07 23:01:35 +0000 |
commit | 3854a5d90fee52af1065edbed34521fff6cdc18d (patch) | |
tree | 23ce60643fdcafc05f97944a86e0e928c5a11702 /test/Transforms | |
parent | 4fae15e664290a974d44145f4a178ec06e8538e9 (diff) | |
download | external_llvm-3854a5d90fee52af1065edbed34521fff6cdc18d.zip external_llvm-3854a5d90fee52af1065edbed34521fff6cdc18d.tar.gz external_llvm-3854a5d90fee52af1065edbed34521fff6cdc18d.tar.bz2 |
Have InstCombine call SipmlifyCall when handling calls. Test case included.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174675 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-rw-r--r-- | test/Transforms/InstCombine/intrinsics.ll | 16 |
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 |