Skip to content
Commit 7ec604a3 authored by Sanjay Patel's avatar Sanjay Patel
Browse files

[InstCombine] try harder to cancel out mul/div

((Op1 * X) / Y) / Op1 --> X / Y
https://alive2.llvm.org/ce/z/JYxWjA

InstSimplify handles the more basic mul+div pattern with
shared operand, but we don't seem to have any reassociation
folds to handle cases where the common op is further away.

This is a generalization of 9cff4711 and another
transform derived from issue #58137.
parent 5185c5db
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment