[PATCH] D54440: Fixed DAGTypeLegalizer::SplitVecOp_EXTRACT_VECTOR_ELT i1 handling
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 12 12:51:26 PST 2018
rampitec created this revision.
rampitec added a reviewer: arsenm.
Herald added a subscriber: wdng.
Legalizer used to request an ext load from i8 to i1 when promoting
vector element type to i8. Fixed. Test is incorporated into https://reviews.llvm.org/D54351
https://reviews.llvm.org/D54440
Files:
lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
Index: lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
===================================================================
--- lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
+++ lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
@@ -1934,6 +1934,12 @@
// Load back the required element.
StackPtr = TLI.getVectorElementPointer(DAG, StackPtr, VecVT, Idx);
+ if (N->getValueType(0).bitsLT(EltVT)) {
+ SDValue Load = DAG.getLoad(EltVT, dl, Store, StackPtr,
+ MachinePointerInfo::getUnknownStack(DAG.getMachineFunction()));
+ return DAG.getZExtOrTrunc(Load, dl, N->getValueType(0));
+ }
+
return DAG.getExtLoad(
ISD::EXTLOAD, dl, N->getValueType(0), Store, StackPtr,
MachinePointerInfo::getUnknownStack(DAG.getMachineFunction()), EltVT);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54440.173735.patch
Type: text/x-patch
Size: 772 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181112/9e866e69/attachment.bin>
More information about the llvm-commits
mailing list