mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-01 21:04:04 -04:00
[Attributor][FIX] Avoid splitting blocks if possible
Before, we eagerly split blocks even if it was not necessary, e.g., they had a single unreachable instruction and only a single predecessor. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@374703 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -177,7 +177,7 @@ cond.true: ; preds = %entry
|
||||
%call = invoke i32 @foo_noreturn() to label %continue
|
||||
unwind label %cleanup
|
||||
; CHECK: %call = invoke i32 @foo_noreturn()
|
||||
; CHECK-NEXT: to label %continue.dead unwind label %cleanup
|
||||
; CHECK-NEXT: to label %continue unwind label %cleanup
|
||||
|
||||
cond.false: ; preds = %entry
|
||||
call void @normal_call()
|
||||
@@ -189,7 +189,7 @@ cond.end: ; preds = %cond.false, %contin
|
||||
ret i32 %cond
|
||||
|
||||
continue:
|
||||
; CHECK: continue.dead:
|
||||
; CHECK: continue:
|
||||
; CHECK-NEXT: unreachable
|
||||
br label %cond.end
|
||||
|
||||
|
||||
@@ -42,12 +42,12 @@ entry:
|
||||
%retval = alloca i32, align 4
|
||||
%__exception_code = alloca i32, align 4
|
||||
; CHECK: invoke void @"?overflow@@YAXXZ"()
|
||||
; CHECK: to label %invoke.cont.dead unwind label %catch.dispatch
|
||||
; CHECK: to label %invoke.cont unwind label %catch.dispatch
|
||||
invoke void @"?overflow@@YAXXZ"()
|
||||
to label %invoke.cont unwind label %catch.dispatch
|
||||
|
||||
invoke.cont: ; preds = %entry
|
||||
; CHECK: invoke.cont.dead:
|
||||
; CHECK: invoke.cont:
|
||||
; CHECK-NEXT: unreachable
|
||||
br label %invoke.cont1
|
||||
|
||||
@@ -101,12 +101,12 @@ entry:
|
||||
%retval = alloca i32, align 4
|
||||
%__exception_code = alloca i32, align 4
|
||||
; CHECK: invoke void @"?overflow@@YAXXZ_may_throw"()
|
||||
; CHECK: to label %invoke.cont.dead unwind label %catch.dispatch
|
||||
; CHECK: to label %invoke.cont unwind label %catch.dispatch
|
||||
invoke void @"?overflow@@YAXXZ_may_throw"()
|
||||
to label %invoke.cont unwind label %catch.dispatch
|
||||
|
||||
invoke.cont: ; preds = %entry
|
||||
; CHECK: invoke.cont.dead:
|
||||
; CHECK: invoke.cont:
|
||||
; CHECK-NEXT: unreachable
|
||||
br label %invoke.cont1
|
||||
|
||||
|
||||
@@ -97,12 +97,12 @@ entry:
|
||||
%retval = alloca i32, align 4
|
||||
%__exception_code = alloca i32, align 4
|
||||
; CHECK: invoke void @"?overflow@@YAXXZ_may_throw"()
|
||||
; CHECK: to label %invoke.cont.dead unwind label %catch.dispatch
|
||||
; CHECK: to label %invoke.cont unwind label %catch.dispatch
|
||||
invoke void @"?overflow@@YAXXZ_may_throw"()
|
||||
to label %invoke.cont unwind label %catch.dispatch
|
||||
|
||||
invoke.cont: ; preds = %entry
|
||||
; CHECK: invoke.cont.dead:
|
||||
; CHECK: invoke.cont:
|
||||
; CHECK-NEXT: unreachable
|
||||
br label %invoke.cont1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user