[PATCH] D100088: [DAGCombiner] Fold step_vector with add/mul/shl
JunMa via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 11 19:34:29 PDT 2021
junparser added inline comments.
================
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);
----------------
david-arm wrote:
> Is it worth adding an assert here like this?
>
> assert(N1.getOperand(0).getValueType() == N0.getOperand(1)->getOperand(0).getValueType());
>
Yep, always worth to add such assert. I'll add later.
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