mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 00:32:23 +00:00
24 lines
346 B
LLVM
24 lines
346 B
LLVM
|
; RUN: llvm-as < %s | opt -ipsccp | llvm-dis | not grep global
|
||
|
|
||
|
%G = internal global int undef
|
||
|
|
||
|
implementation
|
||
|
|
||
|
void %foo() {
|
||
|
%X = load int* %G
|
||
|
store int %X, int* %G
|
||
|
ret void
|
||
|
}
|
||
|
|
||
|
int %bar() {
|
||
|
%V = load int* %G
|
||
|
%C = seteq int %V, 17
|
||
|
br bool %C, label %T, label %F
|
||
|
T:
|
||
|
store int 17, int* %G
|
||
|
ret int %V
|
||
|
F:
|
||
|
store int 123, int* %G
|
||
|
ret int 0
|
||
|
}
|