[llvm] r298910 - [X86][SSE] Set second operand to undef instead of first operand in unary shuffle combines.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 28 05:16:44 PDT 2017
Author: rksimon
Date: Tue Mar 28 07:16:42 2017
New Revision: 298910
URL: http://llvm.org/viewvc/llvm-project?rev=298910&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Modified: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86ISelLowering.cpp?rev=298910&r1=298909&r2=298910&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Tue Mar 28 07:16:42 2017
@@ -27269,7 +27269,8 @@ static bool combineX86ShuffleChain(Array
// 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();
More information about the llvm-commits
mailing list