Skip to content
Commit 4966d8eb authored by Sanjay Patel's avatar Sanjay Patel
Browse files

[InstCombine] distribute div over add with matching mul-by-constant

((X * C2) + C1) / C2 --> X + C1/C2
https://alive2.llvm.org/ce/z/P66io8
https://alive2.llvm.org/ce/z/vghegw

This could be made more general -- the multiplier could be a
multiple of the divisor -- but this is the pattern from
issue #60754.
parent f49d19d5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment