1 ; RUN: llc < %s -mtriple=armv7-apple-darwin | FileCheck %s 2 ; RUN: llc < %s -mtriple=armv4t-apple-darwin | FileCheck %s -check-prefix=V4T 3 4 @X = external global [0 x i32] ; <[0 x i32]*> [#uses=5] 5 6 define i32 @t1() { 7 ; CHECK: t1: 8 ; CHECK: pop 9 ; V4T: t1: 10 ; V4T: pop 11 %tmp = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 0) ; <i32> [#uses=1] 12 %tmp3 = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 1) ; <i32> [#uses=1] 13 %tmp4 = tail call i32 @f1( i32 %tmp, i32 %tmp3 ) ; <i32> [#uses=1] 14 ret i32 %tmp4 15 } 16 17 define i32 @t2() { 18 ; CHECK: t2: 19 ; CHECK: pop 20 ; V4T: t2: 21 ; V4T: pop 22 %tmp = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 2) ; <i32> [#uses=1] 23 %tmp3 = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 3) ; <i32> [#uses=1] 24 %tmp5 = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 4) ; <i32> [#uses=1] 25 %tmp6 = tail call i32 @f2( i32 %tmp, i32 %tmp3, i32 %tmp5 ) ; <i32> [#uses=1] 26 ret i32 %tmp6 27 } 28 29 define i32 @t3() { 30 ; CHECK: t3: 31 ; CHECK: ldmib 32 ; CHECK: pop 33 ; V4T: t3: 34 ; V4T: ldmib 35 ; V4T: pop 36 ; V4T-NEXT: bx lr 37 %tmp = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 1) ; <i32> [#uses=1] 38 %tmp3 = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 2) ; <i32> [#uses=1] 39 %tmp5 = load i32* getelementptr ([0 x i32]* @X, i32 0, i32 3) ; <i32> [#uses=1] 40 %tmp6 = call i32 @f2( i32 %tmp, i32 %tmp3, i32 %tmp5 ) ; <i32> [#uses=1] 41 ret i32 %tmp6 42 } 43 44 declare i32 @f1(i32, i32) 45 46 declare i32 @f2(i32, i32, i32) 47