[llvm] r324179 - [SelectionDAG] Don't use simple VT in generic shuffle code

Simon Pilgrim via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 3 13:34:42 PST 2018


Author: rksimon
Date: Sat Feb  3 13:34:42 2018
New Revision: 324179

URL: http://llvm.org/viewvc/llvm-project?rev=324179&view=rev
Log:
[SelectionDAG] Don't use simple VT in generic shuffle code

Better to assume that any value type may be commuted, not just MVTs.

No test case right now, but discovered while investigating possible shuffle combines.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=324179&r1=324178&r2=324179&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sat Feb  3 13:34:42 2018
@@ -1644,7 +1644,7 @@ SDValue SelectionDAG::getVectorShuffle(E
 }
 
 SDValue SelectionDAG::getCommutedVectorShuffle(const ShuffleVectorSDNode &SV) {
-  MVT VT = SV.getSimpleValueType(0);
+  EVT VT = SV.getValueType(0);
   SmallVector<int, 8> MaskVec(SV.getMask().begin(), SV.getMask().end());
   ShuffleVectorSDNode::commuteMask(MaskVec);
 




More information about the llvm-commits mailing list