[llvm] [GISel] Disable opt_brcond_by_inverting_cond combine at O0 (PR #193417)

Cullen Rhodes via llvm-commits llvm-commits at lists.llvm.org
Thu May 7 04:45:18 PDT 2026


c-rhodes wrote:

> > > what are you looking at, I only see the condition is flipped there?
> > 
> > 
> > Previously, it was this, where the `b .LBB2_2` could (should?) be omitted due to this combine.
> > ```
> > ; CHECK-GIO0-NEXT:    tbnz w8, #28, .LBB2_3
> > ; CHECK-GIO0-NEXT:    b .LBB2_2
> > ; CHECK-GIO0-NEXT:  .LBB2_2: // %if.then2
> > ```
> 
> ah sorry i understand now. Seems that's what used to happen until https://reviews.llvm.org/D86664, perhaps the other combine mentioned there wasn't in the optnone combines, I'm not sure.

I stumbled across c5d84d2eb35c1f0d3b08e1d1e95c1a22a28904d1 yesterday, the fallthrough branch is intentionally kept at the cost of compile-time and code-size  to improve debug builds.

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


More information about the llvm-commits mailing list