[PATCH] D54346: [SelectionDAG][X86] Relax restriction on the width of an input to *_EXTEND_VECTOR_INREG. Use them and regular *_EXTEND to replace the X86 specific VSEXT/VZEXT opcodes

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 10 04:02:16 PST 2018


RKSimon added a comment.

Please can you add context?



================
Comment at: lib/Target/X86/X86ISelLowering.cpp:1345
     setOperationAction(ISD::SIGN_EXTEND_VECTOR_INREG, MVT::v64i8, Custom);
     setOperationAction(ISD::ZERO_EXTEND_VECTOR_INREG, MVT::v64i8, Custom);
----------------
Move these into the for loop?


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:5477
 
-  return DAG.getNode(Opc, DL, VT, In);
+  if (VT.getVectorNumElements() == In.getValueType().getVectorNumElements())
+    return DAG.getNode(Signed ? ISD::SIGN_EXTEND : ISD::ZERO_EXTEND,
----------------
I think there is an InVT type in this function?


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:19830
+
+    if (In.getValueType().getVectorNumElements() != NumElts)
+      return DAG.getNode(Op.getOpcode(), dl, VT, In);
----------------
InVT?


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:40100
 
-  // (vzext (bitcast (vzext (x)) -> (vzext x)
-  // TODO: (vsext (bitcast (vsext (x)) -> (vsext x)
----------------
craig.topper wrote:
> It seems this code is unnecessary either due to this change or before this change. I didn't check which. I removed it assuming I'd need to put some of it back when tests failed but nothing did so I left it out.
NFC pre-removal?


https://reviews.llvm.org/D54346





More information about the llvm-commits mailing list