[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
Mon Oct 4 01:16:39 PDT 2021
foad added a comment.
> G_UMULH x, (1 << c)) -> x >> (bitwidth - c)
This doesn't work when c is 0 because you get an out of range shift. In general you need something like x >> 1 >> (bitwidth - 1 - c).
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