[PATCH] D138508: [TargetLowering] Teach DemandedBits about VSCALE
Paul Walker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 12 06:10:20 PST 2022
paulwalker-arm added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1141-1145
+ if (auto *MulImm = dyn_cast<ConstantSDNode>(Op.getOperand(0))) {
+ VScaleResultUpperbound *= MulImm->getSExtValue();
+ } else {
+ return false;
+ }
----------------
`ISD::VSCALE`'s operand is guaranteed to be a constant so you can use `Op.getConstantOperandAPInt(0) * (*MaxVScale)` without need to test it first.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138508/new/
https://reviews.llvm.org/D138508
More information about the llvm-commits
mailing list