[PATCH] D100812: [DAGCombiner] Allow operand of step_vector to be negative.

Paul Walker via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 22 03:14:35 PDT 2021


paulwalker-arm accepted this revision.
paulwalker-arm added a comment.
This revision is now accepted and ready to land.

A couple of minor requests plus it's worth adding a "step-vector has more than one use" test but otherwise looks good to me.  Thanks for your efforts @junparser, also thanks @frasercrmck and @craig.topper for the assists.



================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:3552
+    return DAG.getNode(ISD::ADD, DL, VT, N0,
+                       DAG.getStepVector(SDLoc(N), VT, NewStep));
+  }
----------------
DL


================
Comment at: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4722
                VT.getScalarSizeInBits()) &&
-           "Expected STEP_VECTOR integer constant to be positive and fit in "
+           "Expected STEP_VECTOR integer constant to be fit in "
            "the vector element type");
----------------
to fit


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100812/new/

https://reviews.llvm.org/D100812



More information about the llvm-commits mailing list