mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32115 91177308-0d34-0410-b5e6-96231b3b80d8
32 lines
490 B
LLVM
32 lines
490 B
LLVM
; RUN: llvm-upgrade < %s | llvm-as | opt -tailduplicate | llvm-dis | grep add | not grep uses=1
|
|
|
|
int %test1(bool %C, int %A, int* %P) {
|
|
entry:
|
|
br bool %C, label %L1, label %L2
|
|
|
|
L1:
|
|
store int 1, int* %P
|
|
br label %L2
|
|
|
|
L2:
|
|
%X = add int %A, 17
|
|
ret int %X
|
|
}
|
|
|
|
int %test2(bool %C, int %A, int* %P) {
|
|
entry:
|
|
br bool %C, label %L1, label %L2
|
|
|
|
L1:
|
|
store int 1, int* %P
|
|
br label %L3
|
|
|
|
L2:
|
|
store int 7, int* %P
|
|
br label %L3
|
|
L3:
|
|
%X = add int %A, 17
|
|
ret int %X
|
|
}
|
|
|