diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2015-04-19 22:16:49 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2015-04-19 22:16:49 +0000 |
| commit | 749953eebbe0ad13acded564f3e16ae37e4b19d3 (patch) | |
| tree | 997cf416bfbf6728a3360bf9bbe6ecc9aeac5956 /llvm/test | |
| parent | 652e384a7af93a471817a3c4ad0c9c0d515e13f0 (diff) | |
| download | bcm5719-llvm-749953eebbe0ad13acded564f3e16ae37e4b19d3.tar.gz bcm5719-llvm-749953eebbe0ad13acded564f3e16ae37e4b19d3.zip | |
[X86][SSE] Fix for getScalarValueForVectorElement to detect scalar sources requiring truncation.
The fix ensures that scalar sources inserted into a vector are the correct bit size.
Integer scalar sources from BUILD_VECTOR and SCALAR_TO_VECTOR nodes may require truncation that this function doesn't currently support.
llvm-svn: 235281
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/CodeGen/X86/fold-vector-shuffle-crash.ll | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/fold-vector-shuffle-crash.ll b/llvm/test/CodeGen/X86/fold-vector-shuffle-crash.ll new file mode 100644 index 00000000000..0bb150bfa86 --- /dev/null +++ b/llvm/test/CodeGen/X86/fold-vector-shuffle-crash.ll @@ -0,0 +1,16 @@ +; RUN: llc < %s -mtriple=x86_64-unknown -mcpu=corei7 + +define void @autogen_SD13708(i32) { +BB: + %Shuff7 = shufflevector <8 x i32> zeroinitializer, <8 x i32> zeroinitializer, <8 x i32> <i32 8, i32 10, i32 12, i32 14, i32 undef, i32 2, i32 4, i32 undef> + br label %CF + +CF: + %Tr = trunc <8 x i64> zeroinitializer to <8 x i32> + %Shuff20 = shufflevector <8 x i32> %Shuff7, <8 x i32> %Tr, <8 x i32> <i32 13, i32 15, i32 1, i32 3, i32 5, i32 7, i32 undef, i32 11> + br i1 undef, label %CF, label %CF247 + +CF247: + %I171 = insertelement <8 x i32> %Shuff20, i32 %0, i32 0 + br i1 undef, label %CF, label %CF247 +}
\ No newline at end of file |

