diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2016-07-29 18:48:27 +0000 |
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2016-07-29 18:48:27 +0000 |
| commit | 718da3d1f6976a1bf89f960519ddab1316637c9a (patch) | |
| tree | 1310bb56d926915ab2c88d2c68b4bfa485bec452 /llvm/test | |
| parent | 5207b5dcaea0971985a1229927a59166af83169b (diff) | |
| download | bcm5719-llvm-718da3d1f6976a1bf89f960519ddab1316637c9a.tar.gz bcm5719-llvm-718da3d1f6976a1bf89f960519ddab1316637c9a.zip | |
[ConstantFolding] Handle bitcasts of undef fp vector elements
We used the wrong type for constructing a zero vector element which led
to type mismatches.
This fixes PR28771.
llvm-svn: 277197
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/Transforms/InstCombine/cast.ll | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstCombine/cast.ll b/llvm/test/Transforms/InstCombine/cast.ll index 46ae14c85cc..c4990eaa307 100644 --- a/llvm/test/Transforms/InstCombine/cast.ll +++ b/llvm/test/Transforms/InstCombine/cast.ll @@ -1386,3 +1386,10 @@ define i32 @test89() { ; CHECK-NEXT: ret i32 393216 ret i32 bitcast (<2 x i16> <i16 6, i16 undef> to i32) } + +define <2 x i32> @test90() { +; CHECK-LABEL: @test90( +; CHECK: ret <2 x i32> <i32 0, i32 15360> + %tmp6 = bitcast <4 x half> <half undef, half undef, half undef, half 0xH3C00> to <2 x i32> + ret <2 x i32> %tmp6 +} |

