[llvm] [InstCombine] Fix missed opportunity to fold 'or' into 'mul' operand. (PR #74225)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sun Dec 3 23:52:19 PST 2023


topperc wrote:

> > > It looks like this caused an infinite loop in the stage2 clang build.
> > 
> > 
> > I reverted it. Any idea why its looping?
> 
> What if X is a constant?

That appears to be the issue. I might look into seeing if I can make foldUsingDistributiveLaws handle disjoint or+mul like add+mul directly. Instead of approximating here.

https://github.com/llvm/llvm-project/pull/74225


More information about the llvm-commits mailing list