[PATCH] D100088: [DAGCombiner] Fold step_vector with add/mul/shl
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 9 05:57:07 PDT 2021
david-arm added a comment.
The folds here look sensible to me! I just have a minor comment about the add fold.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp:2523
+ EVT SVT = N1.getOperand(0).getValueType();
+ SDValue NewStep = DAG.getConstant(SV0 + SV1, DL, SVT);
+ SDValue SV = DAG.getStepVector(DL, VT, NewStep);
----------------
Is it worth adding an assert here like this?
assert(N1.getOperand(0).getValueType() == N0.getOperand(1)->getOperand(0).getValueType());
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100088/new/
https://reviews.llvm.org/D100088
More information about the llvm-commits
mailing list