-
Notifications
You must be signed in to change notification settings - Fork 11.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filter callbr insts from critical edge splitting
Similarly to how splitting predecessors with an indirectbr isn't handled in the generic way, we also shouldn't split callbrs, for similar reasons. (cherry picked from commit 2fe4576)
- Loading branch information
Showing
3 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
; RUN: opt -licm -disable-output < %s | ||
|
||
define i32 @j() { | ||
entry: | ||
br label %for.cond | ||
|
||
for.cond: ; preds = %cond.true.i, %entry | ||
callbr void asm sideeffect "", "X,~{dirflag},~{fpsr},~{flags}"(i8* blockaddress(@j, %for.end)) | ||
to label %cond.true.i [label %for.end] | ||
|
||
cond.true.i: ; preds = %for.cond | ||
%asmresult1.i.i = extractvalue { i8, i32 } zeroinitializer, 1 | ||
br i1 undef, label %for.end, label %for.cond | ||
|
||
for.end: ; preds = %cond.true.i, %for.cond | ||
%asmresult1.i.i2 = phi i32 [ %asmresult1.i.i, %cond.true.i ], [ undef, %for.cond ] | ||
ret i32 undef | ||
} |