[llvm] [RISCV] Improve performCONCAT_VECTORCombine stride matching (PR #68726)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 10 16:39:36 PDT 2023
================
@@ -13862,13 +13913,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));
----------------
preames wrote:
The original code deferred forming the negate so that we didn't form the node if were going to bail out before completing the transform.
https://github.com/llvm/llvm-project/pull/68726
More information about the llvm-commits
mailing list