Skip to content
Commit d76c8f51 authored by Craig Topper's avatar Craig Topper
Browse files

[InstCombine] Add mul with negated power of 2 constant to canEvaluateShifted.

If we are right shifting a multiply by a negated power of 2 where
the power of 2 is the same as the shift amount, we can replace with
a negate followed by an And.

New tests have not been committed yet but the patch shows the diffs.
Let me know if you want any changes or additional tests.

Differential Revision: https://reviews.llvm.org/D130103
parent 3aff7870
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment