[llvm] [RISCV] Improve performCONCAT_VECTORCombine stride matching (PR #68726)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 10 13:16:10 PDT 2023
================
@@ -13862,13 +13915,21 @@ static SDValue performCONCAT_VECTORSCombine(SDNode *N, SelectionDAG &DAG,
SDValue Stride = matchForwardStrided(Ptrs);
if (!Stride) {
Stride = matchReverseStrided(Ptrs);
- Reversed = true;
- // TODO: At this point, we've successfully matched a generalized gather
- // load. Maybe we should emit that, and then move the specialized
- // matchers above and below into a DAG combine?
- if (!Stride)
- return SDValue();
+ if (Stride) {
+ Reversed = true;
+ Stride = DAG.getNegative(Stride, DL, Stride->getValueType(0));
+ } else {
+ Stride = matchConstantStride(N->ops());
+ if (Stride) {
+ Reversed = cast<ConstantSDNode>(Stride)->getSExtValue() < 0;
----------------
topperc wrote:
Is this redundant with the only remaining use of `Reversed`?
https://github.com/llvm/llvm-project/pull/68726
More information about the llvm-commits
mailing list