[llvm] r277947 - [X86] Simplify a shuffle mask copy. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 6 22:39:46 PDT 2016
Author: ctopper
Date: Sun Aug 7 00:39:46 2016
New Revision: 277947
URL: http://llvm.org/viewvc/llvm-project?rev=277947&view=rev
Log:
[X86] Simplify a shuffle mask copy. NFC
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=277947&r1=277946&r2=277947&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp Sun Aug 7 00:39:46 2016
@@ -26075,10 +26075,8 @@ static SDValue combineShuffleToAddSub(SD
if (N->getOpcode() != ISD::VECTOR_SHUFFLE)
return SDValue();
- auto *SVN = cast<ShuffleVectorSDNode>(N);
- SmallVector<int, 8> Mask;
- for (int M : SVN->getMask())
- Mask.push_back(M);
+ ArrayRef<int> OrigMask = cast<ShuffleVectorSDNode>(N)->getMask();
+ SmallVector<int, 8> Mask(OrigMask.begin(), OrigMask.end());
SDValue V1 = N->getOperand(0);
SDValue V2 = N->getOperand(1);
More information about the llvm-commits
mailing list