[llvm] [JumpThreading] Thread over BB with only an unconditional branch (PR #86312)

Quentin Dian via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 23 00:23:07 PDT 2024


================
@@ -8,11 +8,11 @@ define i1 @if_else(i1 %c, i1 %c1) {
 ; CHECK-NEXT:    br i1 [[C]], label [[THEN:%.*]], label [[RETURN:%.*]]
 ; CHECK:       then:
 ; CHECK-NEXT:    call void @dummy()
-; CHECK-NEXT:    br i1 [[C1]], label [[RETURN]], label [[RETURN1:%.*]]
+; CHECK-NEXT:    br i1 [[C1]], label [[ELSE:%.*]], label [[RETURN]]
----------------
DianQK wrote:

I would suggest adding it to the PR description as well. This makes it easier for people to know why we're doing this conversion that doesn't seem to be an improvement. I think it's also worth adding a test case in `PhaseOrder`.

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


More information about the llvm-commits mailing list