2007-04-16 17:36:08 +00:00
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
|
2007-08-15 13:36:28 +00:00
|
|
|
; RUN: grep ldmia | count 2
|
2007-04-16 17:36:08 +00:00
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm | \
|
2007-08-15 13:36:28 +00:00
|
|
|
; RUN: grep ldmib | count 1
|
2007-04-16 17:36:08 +00:00
|
|
|
; RUN: llvm-upgrade < %s | llvm-as | llc -mtriple=arm-apple-darwin | \
|
2007-08-15 13:36:28 +00:00
|
|
|
; RUN: grep {ldmfd sp\!} | count 3
|
2007-01-19 09:20:23 +00:00
|
|
|
|
|
|
|
%X = external global [0 x int]
|
|
|
|
|
|
|
|
int %t1() {
|
|
|
|
%tmp = load int* getelementptr ([0 x int]* %X, int 0, int 0)
|
|
|
|
%tmp3 = load int* getelementptr ([0 x int]* %X, int 0, int 1)
|
|
|
|
%tmp4 = tail call int %f1( int %tmp, int %tmp3 )
|
|
|
|
ret int %tmp4
|
|
|
|
}
|
|
|
|
|
|
|
|
int %t2() {
|
|
|
|
%tmp = load int* getelementptr ([0 x int]* %X, int 0, int 2)
|
|
|
|
%tmp3 = load int* getelementptr ([0 x int]* %X, int 0, int 3)
|
|
|
|
%tmp5 = load int* getelementptr ([0 x int]* %X, int 0, int 4)
|
|
|
|
%tmp6 = tail call int %f2( int %tmp, int %tmp3, int %tmp5 )
|
|
|
|
ret int %tmp6
|
|
|
|
}
|
|
|
|
|
|
|
|
int %t3() {
|
|
|
|
%tmp = load int* getelementptr ([0 x int]* %X, int 0, int 1)
|
|
|
|
%tmp3 = load int* getelementptr ([0 x int]* %X, int 0, int 2)
|
|
|
|
%tmp5 = load int* getelementptr ([0 x int]* %X, int 0, int 3)
|
|
|
|
%tmp6 = tail call int %f2( int %tmp, int %tmp3, int %tmp5 )
|
|
|
|
ret int %tmp6
|
|
|
|
}
|
|
|
|
|
|
|
|
declare int %f1(int, int)
|
|
|
|
declare int %f2(int, int, int)
|