llvm-project/llvm/test/ExecutionEngine/test-loadstore.ll

38 lines
677 B
LLVM
Raw Normal View History

; RUN: llvm-upgrade < %s | llvm-as -f -o %t.bc
2004-11-07 07:32:43 +08:00
; RUN: lli %t.bc > /dev/null
2003-01-13 08:57:04 +08:00
void %test(sbyte* %P, short* %P, int* %P, long* %P) {
%V = load sbyte* %P
store sbyte %V, sbyte* %P
%V = load short* %P
store short %V, short* %P
%V = load int* %P
store int %V, int* %P
2003-01-13 08:57:04 +08:00
%V = load long* %P
store long %V, long* %P
ret void
}
uint %varalloca(uint %Size) {
%X = alloca uint, uint %Size ;; Variable sized alloca
store uint %Size, uint* %X
%Y = load uint* %X
ret uint %Y
}
int %main() {
%A = alloca sbyte
%B = alloca short
%C = alloca int
2003-01-13 08:57:04 +08:00
%D = alloca long
call void %test(sbyte* %A, short* %B, int* %C, long* %D)
call uint %varalloca(uint 7)
ret int 0
}