[PATCH] [AArch64] Change default legalization behavior of v1i32 to be widen to v2i32 instead of scalarization
Tim Northover
t.p.northover at gmail.com
Wed Jul 2 03:43:06 PDT 2014
Hi Hao,
This looks reasonable now; I've just got some minor nits about the implementation of the callbacks. LGTM otherwise.
Cheers.
Tim.
================
Comment at: lib/Target/AArch64/AArch64ISelLowering.cpp:7897-7899
@@ +7896,5 @@
+ return TypeWidenVector;
+ if (VT.getVectorNumElements() == 1)
+ return TypeScalarizeVector;
+ return TypePromoteInteger;
+}
----------------
Could you change this to "return TargetLoweringBase::getPreferredVectorAction(VT)"? It makes it clearer we're not overriding anything else.
================
Comment at: lib/Target/NVPTX/NVPTXISelLowering.cpp:478-481
@@ +477,6 @@
+NVPTXTargetLowering::getPreferredVectorAction(EVT VT) const {
+ if (VT.getVectorNumElements() == 1)
+ return TypeScalarizeVector;
+ if (VT.getScalarType() == MVT::i1)
+ return TypeSplitVector;
+ return TypePromoteInteger;
----------------
Similarly, I think these might be clearer as "if (VT.getVectorNumElements() != 1 && VT.getScalarType() == MVT::i1)" followed by deferring to the base implementation.
http://reviews.llvm.org/D4322
More information about the llvm-commits
mailing list