[PATCH] D20443: [PowerPC] - Legalize illegal vector types by widening rather than integer promotion
Hal Finkel via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 4 05:48:54 PDT 2016
hfinkel accepted this revision.
hfinkel added a comment.
This revision is now accepted and ready to land.
I apologize for the delay. Some minor requests below, but otherwise, LGTM.
Comment at: lib/Target/PowerPC/PPCISelLowering.h:141
@@ +140,3 @@
+ /// Extract a subvector from signed integer vector and convert to FP
This name does not make it clear that you're converting to FP values. Let's name these SINT_VEC_TO_FP and UINT_VEC_TO_FP. Also note there that this is used for illegal vector types.
Comment at: lib/Target/PowerPC/PPCISelLowering.h:443
@@ +442,3 @@
+ /// legalized by promoting the integer element type is much worse than code
+ /// we generate if we widen the type for applicable vectory types.
+ TargetLoweringBase::LegalizeTypeAction getPreferredVectorAction(EVT VT)
Can you say something about why it is worse. N years from now someone will wonder whether this is still true ;)
Comment at: lib/Target/PowerPC/PPCInstrVSX.td:72
@@ -68,1 +71,3 @@
def PPCmtvsrz : SDNode<"PPCISD::MTVSRZ", SDTUnaryOp, >;
+def PPCSV2V : SDNode<"PPCISD::SINT_VEC_TO_VEC", SDTVecConv, >;
+def PPCUV2V : SDNode<"PPCISD::UINT_VEC_TO_VEC", SDTVecConv, >;
The existing naming convention here seems to have lower-case latter parts. Not sure why, but we might as well follow it for now.
def PPCsvec2fp : ...
def PPCuvec2fp : ...
More information about the llvm-commits