[PATCH] Code Generator for Gather and Scatter Intrinsics.
Craig Topper
craig.topper at gmail.com
Thu Mar 26 23:41:33 PDT 2015
REPOSITORY
rL LLVM
================
Comment at: ../include/llvm/Target/TargetSelectionDAG.td:200
@@ +199,3 @@
+def SDTMaskedGather: SDTypeProfile<1, 3, [ // masked gather
+ SDTCisVec<0>, SDTCisSameAs<0, 1>, SDTCisVec<2>
+]>;
----------------
I think we should add SDTCisPtrTy for the last argument to both scatter and gather?
================
Comment at: ../lib/Target/X86/X86InstrFragmentsSIMD.td:499
@@ +498,3 @@
+ (masked_gather node:$src1, node:$src2, node:$src3) , [{
+ //if (MaskedGatherSDNode *Mgt = dyn_cast<MaskedGatherSDNode>(N))
+ // return (Mgt->getIndex().getValueType() == MVT::v8i32 ||
----------------
craig.topper wrote:
> Why so much commented out code?
Oh was this commented out to simplify review?
================
Comment at: include/llvm/CodeGen/SelectionDAG.h:876
@@ +875,3 @@
+ SDValue getMaskedGather(SDVTList VTs, EVT VT, SDLoc dl,
+ ArrayRef<SDValue> Ops, MachineMemOperand *MMO);
+ SDValue getMaskedScatter(SDVTList VTs, EVT VT, SDLoc dl,
----------------
Second line isn't quite aligned right. Same with the line below.
================
Comment at: include/llvm/CodeGen/SelectionDAGNodes.h:2038
@@ +2037,3 @@
+ static bool classof(const SDNode *N) {
+ return (N->getOpcode() == ISD::MGATHER);
+ }
----------------
No need for parentheses
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:5130
@@ -5064,1 +5129,3 @@
}
+SDValue DAGCombiner::visitMGATHER(SDNode *N) {
+
----------------
Please add a blank line between this function and the previous function.
================
Comment at: lib/CodeGen/SelectionDAG/DAGCombiner.cpp:5185
@@ +5184,3 @@
+
+// MMO = DAG.getMachineFunction().
+// getMachineMemOperand(MGT->getPointerInfo(),
----------------
Is there a reason this is commented out instead of just removed?
================
Comment at: lib/Target/X86/X86ISelLowering.cpp:1379
@@ -1378,1 +1378,3 @@
unsigned EltSize = VT.getVectorElementType().getSizeInBits();
+ if ( EltSize >= 32 && VT.getSizeInBits() <= 512) {
+ setOperationAction(ISD::MGATHER, VT, Custom);
----------------
No space before EltSize.
http://reviews.llvm.org/D7665
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list