llvm.org GIT mirror llvm / 2720248
Fix slightly too aggressive conact_vector optimization. (Would sometimes optimize away conacts used to extend a vector with undef values) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181186 91177308-0d34-0410-b5e6-96231b3b80d8 Michael Kuperstein 7 years ago
2 changed file(s) with 20 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
91449144 return SDValue();
91459145 } else {
91469146 SingleSource = Op.getOperand(0);
9147
9148 // Check the source type is the same as the type of the result.
9149 // If not, this concat may extend the vector, so we can not
9150 // optimize it away.
9151 if (SingleSource.getValueType() != N->getValueType(0))
9152 return SDValue();
91479153 }
91489154
91499155 unsigned IdentityIndex = i * PartNumElem;
0 ; RUN: llc < %s -march=x86
1
2 ; Make sure this doesn't crash
3
4 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
5 target triple = "x86_64-pc-win32"
6
7 define void @foo() {
8 %1 = shufflevector <3 x i8> undef, <3 x i8> undef, <2 x i32>
9 %2 = shufflevector <2 x i8> %1, <2 x i8> undef, <4 x i32>
10 %3 = shufflevector <4 x i8> undef, <4 x i8> %2, <4 x i32>
11 store <4 x i8> %3, <4 x i8>* undef
12 ret void
13 }