diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2013-05-10 09:16:52 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2013-05-10 09:16:52 +0000 |
commit | 51dab6e3945a6d06a713869967ced3a8f9fb6294 (patch) | |
tree | 58b3649591110f840eda4e62ca14ada414b5a78b /test/Transforms/InstCombine | |
parent | 58e87a68a8593b0ae133d0bac17ae2027519a204 (diff) | |
download | external_llvm-51dab6e3945a6d06a713869967ced3a8f9fb6294.zip external_llvm-51dab6e3945a6d06a713869967ced3a8f9fb6294.tar.gz external_llvm-51dab6e3945a6d06a713869967ced3a8f9fb6294.tar.bz2 |
InstCombine: Verify the type before transforming uitofp into select.
PR15952.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181586 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/InstCombine')
-rw-r--r-- | test/Transforms/InstCombine/add4.ll | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/add4.ll b/test/Transforms/InstCombine/add4.ll index 3b19e9e..0fc0a6c 100644 --- a/test/Transforms/InstCombine/add4.ll +++ b/test/Transforms/InstCombine/add4.ll @@ -38,3 +38,21 @@ EntryBlock: ; CHECK: select i1 %C, float %B, float %A } +; PR15952 +define float @test4(float %A, float %B, i32 %C) { + %cf = uitofp i32 %C to float + %mc = fsub float 1.000000e+00, %cf + %p1 = fmul fast float %A, %mc + ret float %p1 +; CHECK: @test4 +; CHECK: uitofp +} + +define float @test5(float %A, float %B, i32 %C) { + %cf = uitofp i32 %C to float + %p2 = fmul fast float %B, %cf + ret float %p2 +; CHECK: @test5 +; CHECK: uitofp +} + |