Home | History | Annotate | Download | only in Thumb
      1 ; RUN: llc -mtriple thumbv5-none-linux-gnueabi < %s | FileCheck %s
      2 
      3 %struct.C = type { [1000 x i8] }
      4 %struct.S = type { [1000 x i16] }
      5 %struct.I = type { [1000 x i32] }
      6 
      7 ;CHECK-LABEL: pass_C:
      8 ;CHECK-NOT: ldrb    r{{[0-9]+}}, [{{.*}}], #1
      9 ;CHECK-NOT: strb    r{{[0-9]+}}, [{{.*}}], #1
     10 define void @pass_C() #0 {
     11 entry:
     12   %c = alloca %struct.C, align 1
     13   %0 = getelementptr inbounds %struct.C* %c, i32 0, i32 0, i32 0
     14   call void @llvm.lifetime.start(i64 1000, i8* %0) #1
     15   call void @use_C(%struct.C* byval %c) #3
     16   call void @llvm.lifetime.end(i64 1000, i8* %0) #1
     17   ret void
     18 }
     19 
     20 ;CHECK-LABEL: pass_S:
     21 ;CHECK-NOT: ldrh    r{{[0-9]+}}, [{{.*}}], #2
     22 ;CHECK-NOT: strh    r{{[0-9]+}}, [{{.*}}], #2
     23 define void @pass_S() #0 {
     24 entry:
     25   %s = alloca %struct.S, align 2
     26   %0 = bitcast %struct.S* %s to i8*
     27   call void @llvm.lifetime.start(i64 2000, i8* %0) #1
     28   call void @use_S(%struct.S* byval %s) #3
     29   call void @llvm.lifetime.end(i64 2000, i8* %0) #1
     30   ret void
     31 }
     32 
     33 ;CHECK-LABEL: pass_I:
     34 ;CHECK-NOT: ldr     r{{[0-9]+}}, [{{.*}}], #4
     35 ;CHECK-NOT: str     r{{[0-9]+}}, [{{.*}}], #4
     36 define void @pass_I() #0 {
     37 entry:
     38   %i = alloca %struct.I, align 4
     39   %0 = bitcast %struct.I* %i to i8*
     40   call void @llvm.lifetime.start(i64 4000, i8* %0) #1
     41   call void @use_I(%struct.I* byval %i) #3
     42   call void @llvm.lifetime.end(i64 4000, i8* %0) #1
     43   ret void
     44 }
     45 
     46 declare void @use_C(%struct.C* byval) #2
     47 declare void @use_S(%struct.S* byval) #2
     48 declare void @use_I(%struct.I* byval) #2
     49 
     50 declare void @llvm.lifetime.start(i64, i8* nocapture) #1
     51 declare void @llvm.lifetime.end(i64, i8* nocapture) #1
     52 
     53 
     54 attributes #0 = { nounwind optsize "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
     55 attributes #1 = { nounwind }
     56 attributes #2 = { optsize "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-frame-pointer-elim-non-leaf"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
     57 attributes #3 = { nounwind optsize }
     58