Home | History | Annotate | Download | only in ARM
      1 ; RUN: llc < %s -march=arm -mtriple=arm-linux-gnueabi | FileCheck %s
      2 
      3 	%struct.anon = type { i32 (i32, i32, i32)*, i32, i32, [3 x i32], i8*, i8*, i8* }
      4 @r = external global [14 x i32]		; <[14 x i32]*> [#uses=4]
      5 @isa = external global [13 x %struct.anon]		; <[13 x %struct.anon]*> [#uses=1]
      6 @pgm = external global [2 x { i32, [3 x i32] }]		; <[2 x { i32, [3 x i32] }]*> [#uses=4]
      7 @numi = external global i32		; <i32*> [#uses=1]
      8 @counter = external global [2 x i32]		; <[2 x i32]*> [#uses=1]
      9 
     10 ; CHECK-LABEL: main_bb_2E_i_bb205_2E_i_2E_i_bb115_2E_i_2E_i:
     11 ; CHECK-NOT: bx lr
     12 
     13 define void @main_bb_2E_i_bb205_2E_i_2E_i_bb115_2E_i_2E_i() {
     14 newFuncRoot:
     15 	br label %bb115.i.i
     16 
     17 bb115.i.i.bb170.i.i_crit_edge.exitStub:		; preds = %bb115.i.i
     18 	ret void
     19 
     20 bb115.i.i.bb115.i.i_crit_edge:		; preds = %bb115.i.i
     21 	br label %bb115.i.i
     22 
     23 bb115.i.i:		; preds = %bb115.i.i.bb115.i.i_crit_edge, %newFuncRoot
     24 	%i_addr.3210.0.i.i = phi i32 [ %tmp166.i.i, %bb115.i.i.bb115.i.i_crit_edge ], [ 0, %newFuncRoot ]		; <i32> [#uses=7]
     25 	%tmp124.i.i = getelementptr [2 x { i32, [3 x i32] }], [2 x { i32, [3 x i32] }]* @pgm, i32 0, i32 %i_addr.3210.0.i.i, i32 1, i32 0		; <i32*> [#uses=1]
     26 	%tmp125.i.i = load i32, i32* %tmp124.i.i		; <i32> [#uses=1]
     27 	%tmp126.i.i = getelementptr [14 x i32], [14 x i32]* @r, i32 0, i32 %tmp125.i.i		; <i32*> [#uses=1]
     28 	%tmp127.i.i = load i32, i32* %tmp126.i.i		; <i32> [#uses=1]
     29 	%tmp131.i.i = getelementptr [2 x { i32, [3 x i32] }], [2 x { i32, [3 x i32] }]* @pgm, i32 0, i32 %i_addr.3210.0.i.i, i32 1, i32 1		; <i32*> [#uses=1]
     30 	%tmp132.i.i = load i32, i32* %tmp131.i.i		; <i32> [#uses=1]
     31 	%tmp133.i.i = getelementptr [14 x i32], [14 x i32]* @r, i32 0, i32 %tmp132.i.i		; <i32*> [#uses=1]
     32 	%tmp134.i.i = load i32, i32* %tmp133.i.i		; <i32> [#uses=1]
     33 	%tmp138.i.i = getelementptr [2 x { i32, [3 x i32] }], [2 x { i32, [3 x i32] }]* @pgm, i32 0, i32 %i_addr.3210.0.i.i, i32 1, i32 2		; <i32*> [#uses=1]
     34 	%tmp139.i.i = load i32, i32* %tmp138.i.i		; <i32> [#uses=1]
     35 	%tmp140.i.i = getelementptr [14 x i32], [14 x i32]* @r, i32 0, i32 %tmp139.i.i		; <i32*> [#uses=1]
     36 	%tmp141.i.i = load i32, i32* %tmp140.i.i		; <i32> [#uses=1]
     37 	%tmp143.i.i = add i32 %i_addr.3210.0.i.i, 12		; <i32> [#uses=1]
     38 	%tmp146.i.i = getelementptr [2 x { i32, [3 x i32] }], [2 x { i32, [3 x i32] }]* @pgm, i32 0, i32 %i_addr.3210.0.i.i, i32 0		; <i32*> [#uses=1]
     39 	%tmp147.i.i = load i32, i32* %tmp146.i.i		; <i32> [#uses=1]
     40 	%tmp149.i.i = getelementptr [13 x %struct.anon], [13 x %struct.anon]* @isa, i32 0, i32 %tmp147.i.i, i32 0		; <i32 (i32, i32, i32)**> [#uses=1]
     41 	%tmp150.i.i = load i32 (i32, i32, i32)*, i32 (i32, i32, i32)** %tmp149.i.i		; <i32 (i32, i32, i32)*> [#uses=1]
     42 	%tmp154.i.i = tail call i32 %tmp150.i.i( i32 %tmp127.i.i, i32 %tmp134.i.i, i32 %tmp141.i.i )		; <i32> [#uses=1]
     43 	%tmp155.i.i = getelementptr [14 x i32], [14 x i32]* @r, i32 0, i32 %tmp143.i.i		; <i32*> [#uses=1]
     44 	store i32 %tmp154.i.i, i32* %tmp155.i.i
     45 	%tmp159.i.i = getelementptr [2 x i32], [2 x i32]* @counter, i32 0, i32 %i_addr.3210.0.i.i		; <i32*> [#uses=2]
     46 	%tmp160.i.i = load i32, i32* %tmp159.i.i		; <i32> [#uses=1]
     47 	%tmp161.i.i = add i32 %tmp160.i.i, 1		; <i32> [#uses=1]
     48 	store i32 %tmp161.i.i, i32* %tmp159.i.i
     49 	%tmp166.i.i = add i32 %i_addr.3210.0.i.i, 1		; <i32> [#uses=2]
     50 	%tmp168.i.i = load i32, i32* @numi		; <i32> [#uses=1]
     51 	icmp slt i32 %tmp166.i.i, %tmp168.i.i		; <i1>:0 [#uses=1]
     52 	br i1 %0, label %bb115.i.i.bb115.i.i_crit_edge, label %bb115.i.i.bb170.i.i_crit_edge.exitStub
     53 }
     54 
     55 define void @PR15520(void ()* %fn) {
     56   call void %fn()
     57   ret void
     58 
     59 ; CHECK-LABEL: PR15520:
     60 ; CHECK: mov lr, pc
     61 ; CHECK: mov pc, r0
     62 }
     63