[llvm] [InstCombine] Canonicalize complex boolean expressions into ~((y | z) ^ x) via 3-input truth table (PR #149530)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 29 03:24:18 PDT 2025


yafet-a wrote:

> Infinite loop reproducer:
> 
```
; bin/opt -passes=instcombine reduced.ll -S
define i32 @func_198(ptr %l_306, ptr %arrayidx287, ptr %p) {
...
```
Thanks!, this was definitely a byproduct of the change to treat non bitwise logic ops as leaf nodes. I've added a structural similarity check in the entry function now in the latest commit. It should prevent issues like this now.


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


More information about the llvm-commits mailing list