Home | History | Annotate | Download | only in ARM
      1 ; RUN: llc < %s -mtriple=armv7-apple-ios6.0 | FileCheck %s
      2 
      3 ; rdar://9877866
      4 %struct.SmallStruct = type { i32, [8 x i32], [37 x i8] }
      5 %struct.LargeStruct = type { i32, [1001 x i8], [300 x i32] }
      6 
      7 define i32 @f() nounwind ssp {
      8 entry:
      9 ; CHECK: f:
     10 ; CHECK: ldr
     11 ; CHECK: str
     12 ; CHECK-NOT:bne
     13   %st = alloca %struct.SmallStruct, align 4
     14   %call = call i32 @e1(%struct.SmallStruct* byval %st)
     15   ret i32 0
     16 }
     17 
     18 ; Generate a loop for large struct byval
     19 define i32 @g() nounwind ssp {
     20 entry:
     21 ; CHECK: g:
     22 ; CHECK: ldr
     23 ; CHECK: sub
     24 ; CHECK: str
     25 ; CHECK: bne
     26   %st = alloca %struct.LargeStruct, align 4
     27   %call = call i32 @e2(%struct.LargeStruct* byval %st)
     28   ret i32 0
     29 }
     30 
     31 ; Generate a loop using NEON instructions
     32 define i32 @h() nounwind ssp {
     33 entry:
     34 ; CHECK: h:
     35 ; CHECK: vld1
     36 ; CHECK: sub
     37 ; CHECK: vst1
     38 ; CHECK: bne
     39   %st = alloca %struct.LargeStruct, align 16
     40   %call = call i32 @e3(%struct.LargeStruct* byval align 16 %st)
     41   ret i32 0
     42 }
     43 
     44 declare i32 @e1(%struct.SmallStruct* nocapture byval %in) nounwind
     45 declare i32 @e2(%struct.LargeStruct* nocapture byval %in) nounwind
     46 declare i32 @e3(%struct.LargeStruct* nocapture byval align 16 %in) nounwind
     47