2 ; RUN: llc < %s -O0 -frame-pointer=all -relocation-model=pic -stats 2>&1 | FileCheck %s
4 ; This test should not cause any spilling with RAFast.
6 ; CHECK: Number of copies coalesced
7 ; CHECK-NOT: Number of stores added
9 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
10 target triple = "x86_64-apple-darwin10.0.0"
12 %0 = type { i64, i64, ptr, ptr }
15 %3 = type <{ ptr, i32, i32, ptr, ptr, i64 }>
16 %4 = type { ptr, i32, i32, ptr, ptr, i64 }
17 %5 = type { i64, i64 }
18 %6 = type { ptr, i32, i32, ptr, ptr }
20 @0 = external hidden constant %0
22 define hidden void @f() ssp {
24 %tmp5 = alloca i64, align 8
25 %tmp6 = alloca ptr, align 8
26 %tmp7 = alloca %3, align 8
27 store i64 0, ptr %tmp5, align 8
30 bb8: ; preds = %bb23, %bb
31 %tmp15 = getelementptr inbounds %3, ptr %tmp7, i32 0, i32 4
32 store ptr @0, ptr %tmp15
33 store ptr %tmp7, ptr %tmp6, align 8
34 %tmp17 = load ptr, ptr %tmp6, align 8
35 %tmp19 = getelementptr inbounds %6, ptr %tmp17, i32 0, i32 3
36 %tmp21 = load ptr, ptr %tmp19
37 call void %tmp21(ptr %tmp17)
41 %tmp24 = load i64, ptr %tmp5, align 8
42 %tmp25 = add i64 %tmp24, 1
43 store i64 %tmp25, ptr %tmp5, align 8
44 %tmp26 = icmp ult i64 %tmp25, 10
45 br i1 %tmp26, label %bb8, label %bb27