[InstCombine] Further simplify udiv -> lshr folding
authorNikita Popov <npopov@redhat.com>
Wed, 23 Feb 2022 14:24:44 +0000 (15:24 +0100)
committerNikita Popov <npopov@redhat.com>
Wed, 23 Feb 2022 14:29:21 +0000 (15:29 +0100)
commit03e6efb8c23f489e45353b6b6d941628d9c49ca2
tree8af7e82eba7030542a48634235d05e8c9d1a93a0
parentb1a8dcf8c186ddfeeb062ab8475fe30365557955
[InstCombine] Further simplify udiv -> lshr folding

Rather than queuing up actions, have one function that does the
log2() fold in the obvious way, but with a flag that allows us
to check whether the fold will succeed without actually performing
it.
llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp