[PATCH] D111036: [GlobalISel] Combine G_UMULH x, (1 << c)) -> x >> (bitwidth - c)
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 8 00:08:27 PDT 2021
foad added inline comments.
================
Comment at: llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp:4581
+ LLT ShiftAmtTy = getTargetLowering().getPreferredShiftAmountTy(Ty);
+ auto CstVal = isConstantOrConstantSplatVector(*MRI.getVRegDef(RHS), MRI);
+ if (!CstVal || CstVal->isOne() || !isPowerOf2_64(CstVal->getZExtValue()))
----------------
This will no longer handle the "mix of non-NPQ/NPQ paths" that D110890 can generate.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111036/new/
https://reviews.llvm.org/D111036
More information about the llvm-commits
mailing list