diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2017-03-28 12:16:42 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2017-03-28 12:16:42 +0000 |
| commit | 6afe0e28338ab235af3a11b0a101f5f6fdf5940e (patch) | |
| tree | 5188f7cbce0a2b515b8eb3a1f992df93964e1f68 /llvm/lib | |
| parent | defee5683c261edb06d934fecd61476783a89489 (diff) | |
| download | bcm5719-llvm-6afe0e28338ab235af3a11b0a101f5f6fdf5940e.tar.gz bcm5719-llvm-6afe0e28338ab235af3a11b0a101f5f6fdf5940e.zip | |
[X86][SSE] Set second operand to undef instead of first operand in unary shuffle combines.
Copy isn't necessary after the matchVectorShuffleWithUNPCK refactor and undef value will make some future undef/zero handling easier.
llvm-svn: 298910
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 94b24017ece..74a8fb189ac 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -27269,7 +27269,8 @@ static bool combineX86ShuffleChain(ArrayRef<SDValue> Inputs, SDValue Root, // here, we're not going to remove the operands we find. bool UnaryShuffle = (Inputs.size() == 1); SDValue V1 = peekThroughBitcasts(Inputs[0]); - SDValue V2 = (UnaryShuffle ? V1 : peekThroughBitcasts(Inputs[1])); + SDValue V2 = (UnaryShuffle ? DAG.getUNDEF(V1.getValueType()) + : peekThroughBitcasts(Inputs[1])); MVT VT1 = V1.getSimpleValueType(); MVT VT2 = V2.getSimpleValueType(); |

