mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-29 10:32:47 +00:00
4dc9e5ac0d
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32154 91177308-0d34-0410-b5e6-96231b3b80d8
31 lines
543 B
LLVM
31 lines
543 B
LLVM
; RUN: llvm-upgrade %s | llvm-as -f -o %t.bc
|
|
; RUN: lli %t.bc > /dev/null
|
|
|
|
%A = global int 0
|
|
|
|
int %main() {
|
|
%Ret = call int %test(bool true, int 0)
|
|
ret int %Ret
|
|
}
|
|
|
|
int %test(bool %c, int %A) {
|
|
br bool %c, label %Taken1, label %NotTaken
|
|
|
|
Cont:
|
|
%V = phi int [0, %NotTaken],
|
|
[ sub (int cast (int* %A to int), int 1234), %Taken1]
|
|
ret int 0
|
|
|
|
NotTaken:
|
|
br label %Cont
|
|
|
|
Taken1:
|
|
%B = seteq int %A, 0
|
|
; Code got inserted here, breaking the condition code.
|
|
br bool %B, label %Cont, label %ExitError
|
|
|
|
ExitError:
|
|
ret int 12
|
|
|
|
}
|