Skip to content
Commit a13c0f62 authored by Nikita Popov's avatar Nikita Popov
Browse files

[InstSimplify] Fold x*C1/C2 <= x (PR48744)

We can fold x*C1/C2 <= x to true if C1 <= C2. This is valid even
if the multiplication is not nuw: https://alive2.llvm.org/ce/z/vULors

The multiplication or division can be replaced by shifts. We don't
handle the case where both are shifts, as that should get folded
away by InstCombine.
parent 4bfbfb9b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment