[PATCH] D128911: Emit table lookup from TargetLowering::expandCTTZ()
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 5 08:04:36 PDT 2022
craig.topper accepted this revision.
craig.topper added a comment.
This revision is now accepted and ready to land.
LGTM to me with those two changes
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:8001
+ DAG.getNode(ISD::MUL, DL, VT, DAG.getNode(ISD::AND, DL, VT, Op, Neg),
+ DAG.getConstant(DeBruijn.getZExtValue(), DL, VT)),
+ DAG.getConstant(ShiftAmt, DL, VT));
----------------
You don't need getZExtValue() here
================
Comment at: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:8018
+ DAG.getMemBasePlusOffset(CPIdx, Lookup, DL),
+ PtrInfo, EVT(MVT::i8));
+ if (Node->getOpcode() != ISD::CTLZ_ZERO_UNDEF) {
----------------
I don't think you need an explicit `EVT` around MVT::i8
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D128911/new/
https://reviews.llvm.org/D128911
More information about the llvm-commits
mailing list