[PATCH] D54467: [X86] Disable combineToExtendVectorInReg under -x86-experimental-vector-widening-legalization. Add custom type legalization for extends.
Simon Pilgrim via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 15 11:00:28 PST 2018
RKSimon added inline comments.
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:26247
+ assert((VT == MVT::v16i32 || VT == MVT::v8i64) && "Unexpected VT!");
+ if (In.getValueType().getSizeInBits() == 128) {
+ // Perform custom splitting instead of the two stage extend we would get
----------------
Use is128BitVector() ?
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:26263
+ unsigned NumElts = InVT.getVectorNumElements();
+ unsigned HalfNumElts = InVT.getVectorNumElements() / 2;
+ SmallVector<int, 16> ShufMask(NumElts, -1);
----------------
NumElts / 2
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:26264
+ unsigned HalfNumElts = InVT.getVectorNumElements() / 2;
+ SmallVector<int, 16> ShufMask(NumElts, -1);
+ for (unsigned i = 0; i != HalfNumElts; ++i)
----------------
Use SM_SentinelUndef instead of -1
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:26269
+ SDValue Hi = DAG.getVectorShuffle(InVT, dl, In, In, ShufMask);
+ Hi = DAG.getNode(InRegOpc, dl, HiVT, Hi);
+
----------------
Worth using getExtendInVec ?
https://reviews.llvm.org/D54467
More information about the llvm-commits
mailing list