mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
jump threading can't split a critical edge from an indirectbr. This
fixes PR7356. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105950 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -341,3 +341,25 @@ if.end12: ; preds = %if.then, %lbl_51
|
||||
ret void
|
||||
}
|
||||
|
||||
|
||||
|
||||
; PR7356
|
||||
define i32 @test13(i32* %P, i8* %Ptr) {
|
||||
entry:
|
||||
indirectbr i8* %Ptr, [label %BrBlock, label %B2]
|
||||
|
||||
B2:
|
||||
store i32 4, i32 *%P
|
||||
br label %BrBlock
|
||||
|
||||
BrBlock:
|
||||
%L = load i32* %P
|
||||
%C = icmp eq i32 %L, 42
|
||||
br i1 %C, label %T, label %F
|
||||
|
||||
T:
|
||||
ret i32 123
|
||||
F:
|
||||
ret i32 1422
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user