[llvm] [SimplifyCFG] Look at all uses when checking phi incoming for UB (PR #200164)

Igor Kirillov via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 1 07:17:03 PDT 2026


igogo-x86 wrote:

@nikic Well, this changed shouldn't make compile time worse in practice - we just continue searching for an instruction from the same block and scanning use-list is a trivial operation in LLVM.

The old behavior was dependent on use-list order which is not guaranteed. If the first use with UB-opcode happened to be in a different block, we missed valid same-block uses that prove UB.

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


More information about the llvm-commits mailing list