diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-05-14 18:30:01 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-05-14 18:30:01 +0000 |
commit | 06362e24503170d6f4b152681e4e05bef3a29af6 (patch) | |
tree | fdfe574a1e4a12ab6a712bc751a00971109fb4c5 /test/Transforms | |
parent | 30b015f044cd0157b68f5737321f685741c17423 (diff) | |
download | llvm-06362e24503170d6f4b152681e4e05bef3a29af6.tar.gz llvm-06362e24503170d6f4b152681e4e05bef3a29af6.tar.bz2 llvm-06362e24503170d6f4b152681e4e05bef3a29af6.tar.xz |
Merging r181586:
------------------------------------------------------------------------
r181586 | d0k | 2013-05-10 02:16:52 -0700 (Fri, 10 May 2013) | 3 lines
InstCombine: Verify the type before transforming uitofp into select.
PR15952.
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_33@181813 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms')
-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 3b19e9ef10..0fc0a6c1ac 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 +} + |