1 ; RUN: llc < %s -O0 -disable-fp-elim -relocation-model=pic -stats |& FileCheck %s 2 ; 3 ; This test should not cause any spilling with RAFast. 4 ; 5 ; CHECK: Number of copies coalesced 6 ; CHECK-NOT: Number of stores added 7 ; 8 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" 9 target triple = "x86_64-apple-darwin10.0.0" 10 11 %0 = type { i64, i64, i8*, i8* } 12 %1 = type opaque 13 %2 = type opaque 14 %3 = type <{ i8*, i32, i32, void (%4*)*, i8*, i64 }> 15 %4 = type { i8**, i32, i32, i8**, %5*, i64 } 16 %5 = type { i64, i64 } 17 %6 = type { i8*, i32, i32, i8*, %5* } 18 19 @0 = external hidden constant %0 20 21 define hidden void @f() ssp { 22 bb: 23 %tmp5 = alloca i64, align 8 24 %tmp6 = alloca void ()*, align 8 25 %tmp7 = alloca %3, align 8 26 store i64 0, i64* %tmp5, align 8 27 br label %bb8 28 29 bb8: ; preds = %bb23, %bb 30 %tmp15 = getelementptr inbounds %3* %tmp7, i32 0, i32 4 31 store i8* bitcast (%0* @0 to i8*), i8** %tmp15 32 %tmp16 = bitcast %3* %tmp7 to void ()* 33 store void ()* %tmp16, void ()** %tmp6, align 8 34 %tmp17 = load void ()** %tmp6, align 8 35 %tmp18 = bitcast void ()* %tmp17 to %6* 36 %tmp19 = getelementptr inbounds %6* %tmp18, i32 0, i32 3 37 %tmp20 = bitcast %6* %tmp18 to i8* 38 %tmp21 = load i8** %tmp19 39 %tmp22 = bitcast i8* %tmp21 to void (i8*)* 40 call void %tmp22(i8* %tmp20) 41 br label %bb23 42 43 bb23: ; preds = %bb8 44 %tmp24 = load i64* %tmp5, align 8 45 %tmp25 = add i64 %tmp24, 1 46 store i64 %tmp25, i64* %tmp5, align 8 47 %tmp26 = icmp ult i64 %tmp25, 10 48 br i1 %tmp26, label %bb8, label %bb27 49 50 bb27: ; preds = %bb23 51 ret void 52 } 53