Home | History | Annotate | Download | only in ARM
      1 ;PR15293: ARM codegen ice - expected larger existing stack allocation
      2 ;RUN: llc -mtriple=arm-linux-gnueabihf < %s | FileCheck %s
      3 
      4 ;CHECK-LABEL: foo:
      5 ;CHECK: 	sub	sp, sp, #8
      6 ;CHECK: 	push	{r11, lr}
      7 ;CHECK: 	str	r0, [sp, #8]
      8 ;CHECK: 	add	r0, sp, #8
      9 ;CHECK: 	bl	fooUseParam
     10 ;CHECK: 	pop	{r11, lr}
     11 ;CHECK: 	add	sp, sp, #8
     12 ;CHECK: 	mov	pc, lr
     13 
     14 ;CHECK-LABEL: foo2:
     15 ;CHECK: 	sub	sp, sp, #8
     16 ;CHECK: 	push	{r11, lr}
     17 ;CHECK: 	str	r0, [sp, #8]
     18 ;CHECK: 	add	r0, sp, #8
     19 ;CHECK: 	str	r2, [sp, #12]
     20 ;CHECK: 	bl	fooUseParam
     21 ;CHECK: 	add	r0, sp, #12
     22 ;CHECK: 	bl	fooUseParam
     23 ;CHECK: 	pop	{r11, lr}
     24 ;CHECK: 	add	sp, sp, #8
     25 ;CHECK: 	mov	pc, lr
     26 
     27 ;CHECK-LABEL: doFoo:
     28 ;CHECK: 	push	{r11, lr}
     29 ;CHECK: 	ldr	r0,
     30 ;CHECK: 	ldr	r0, [r0]
     31 ;CHECK: 	bl	foo
     32 ;CHECK: 	pop	{r11, lr}
     33 ;CHECK: 	mov	pc, lr
     34 
     35 
     36 ;CHECK-LABEL: doFoo2:
     37 ;CHECK: 	push	{r11, lr}
     38 ;CHECK: 	ldr	r0,
     39 ;CHECK: 	mov	r1, #0
     40 ;CHECK: 	ldr	r0, [r0]
     41 ;CHECK: 	mov	r2, r0
     42 ;CHECK: 	bl	foo2
     43 ;CHECK: 	pop	{r11, lr}
     44 ;CHECK: 	mov	pc, lr
     45 
     46 
     47 %artz = type { i32 }
     48 @static_val = constant %artz { i32 777 }
     49 
     50 declare void @fooUseParam(%artz* )
     51 
     52 define void @foo(%artz* byval %s) {
     53   call void @fooUseParam(%artz* %s)
     54   ret void
     55 }
     56 
     57 define void @foo2(%artz* byval %s, i32 %p, %artz* byval %s2) {
     58   call void @fooUseParam(%artz* %s)
     59   call void @fooUseParam(%artz* %s2)
     60   ret void
     61 }
     62 
     63 
     64 define void @doFoo() {
     65   call void @foo(%artz* byval @static_val)
     66   ret void
     67 }
     68 
     69 define void @doFoo2() {
     70   call void @foo2(%artz* byval @static_val, i32 0, %artz* byval @static_val)
     71   ret void
     72 }
     73 
     74