[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
Tue Aug 26 02:48:47 PDT 2025


yafet-a wrote:

> Crash reproducer:
> 
> ```
> ; bin/opt -passes=instcombine test.ll -S
> ; bin/opt -passes=instcombine test.ll -S
> target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128"
> target triple = "x86_64-unknown-linux-gnu"
 > ...
 

Thanks for this, since we are now extracting both variables and instructions I would similarly need to ensure not just variables but the computation instructions are in the same BB before using `comesBefore()`. This has been implemented now in the latest commit

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


More information about the llvm-commits mailing list