1 ; RUN: llc < %s -mtriple=ve | FileCheck %s
3 %Foo = type { [125 x i8] }
4 declare void @whatever(i64, %Foo*, i8**, i8*, i8*, i32) #0
5 declare i32 @llvm.eh.sjlj.setjmp(i8*) nounwind
7 ; Function Attrs: noinline nounwind optnone
8 define i32 @t_setjmp(i64 %n, %Foo* byval(%Foo) nocapture readnone align 8 %f) {
9 ; CHECK-LABEL: t_setjmp:
10 ; CHECK: .LBB{{[0-9]+}}_5:
11 ; CHECK-NEXT: st %s18, 48(, %s9) # 8-byte Folded Spill
12 ; CHECK-NEXT: st %s19, 56(, %s9) # 8-byte Folded Spill
13 ; CHECK-NEXT: st %s20, 64(, %s9) # 8-byte Folded Spill
14 ; CHECK-NEXT: st %s21, 72(, %s9) # 8-byte Folded Spill
15 ; CHECK-NEXT: st %s22, 80(, %s9) # 8-byte Folded Spill
16 ; CHECK-NEXT: st %s23, 88(, %s9) # 8-byte Folded Spill
17 ; CHECK-NEXT: st %s24, 96(, %s9) # 8-byte Folded Spill
18 ; CHECK-NEXT: st %s25, 104(, %s9) # 8-byte Folded Spill
19 ; CHECK-NEXT: st %s26, 112(, %s9) # 8-byte Folded Spill
20 ; CHECK-NEXT: st %s27, 120(, %s9) # 8-byte Folded Spill
21 ; CHECK-NEXT: st %s28, 128(, %s9) # 8-byte Folded Spill
22 ; CHECK-NEXT: st %s29, 136(, %s9) # 8-byte Folded Spill
23 ; CHECK-NEXT: st %s30, 144(, %s9) # 8-byte Folded Spill
24 ; CHECK-NEXT: st %s31, 152(, %s9) # 8-byte Folded Spill
25 ; CHECK-NEXT: st %s32, 160(, %s9) # 8-byte Folded Spill
26 ; CHECK-NEXT: st %s33, 168(, %s9) # 8-byte Folded Spill
27 ; CHECK-NEXT: st %s1, 312(, %s17) # 8-byte Folded Spill
28 ; CHECK-NEXT: st %s0, 304(, %s17) # 8-byte Folded Spill
29 ; CHECK-NEXT: lea %s0, 15(, %s0)
30 ; CHECK-NEXT: and %s0, -16, %s0
31 ; CHECK-NEXT: lea %s1, __ve_grow_stack@lo
32 ; CHECK-NEXT: and %s1, %s1, (32)0
33 ; CHECK-NEXT: lea.sl %s12, __ve_grow_stack@hi(, %s1)
34 ; CHECK-NEXT: bsic %s10, (, %s12)
35 ; CHECK-NEXT: lea %s1, 240(, %s11)
36 ; CHECK-NEXT: st %s1, 328(, %s17)
37 ; CHECK-NEXT: lea %s0, .LBB{{[0-9]+}}_3@lo
38 ; CHECK-NEXT: and %s0, %s0, (32)0
39 ; CHECK-NEXT: lea.sl %s0, .LBB{{[0-9]+}}_3@hi(, %s0)
40 ; CHECK-NEXT: st %s17, 24(, %s1)
41 ; CHECK-NEXT: st %s1, 296(, %s17) # 8-byte Folded Spill
42 ; CHECK-NEXT: st %s0, 8(, %s1)
43 ; CHECK-NEXT: # EH_SJlJ_SETUP .LBB{{[0-9]+}}_3
44 ; CHECK-NEXT: # %bb.1:
45 ; CHECK-NEXT: lea %s5, 0
46 ; CHECK-NEXT: br.l.t .LBB{{[0-9]+}}_2
47 ; CHECK-NEXT: .LBB{{[0-9]+}}_3: # Block address taken
48 ; CHECK-NEXT: ld %s17, 24(, %s10)
49 ; CHECK-NEXT: lea %s5, 1
50 ; CHECK-NEXT: .LBB{{[0-9]+}}_2:
51 ; CHECK-NEXT: lea %s0, whatever@lo
52 ; CHECK-NEXT: and %s0, %s0, (32)0
53 ; CHECK-NEXT: lea.sl %s12, whatever@hi(, %s0)
54 ; CHECK-NEXT: lea %s2, 328(, %s17)
55 ; CHECK-NEXT: lea %s3, 320(, %s17)
56 ; CHECK-NEXT: ld %s0, 304(, %s17) # 8-byte Folded Reload
57 ; CHECK-NEXT: ld %s1, 312(, %s17) # 8-byte Folded Reload
58 ; CHECK-NEXT: ld %s4, 296(, %s17) # 8-byte Folded Reload
59 ; CHECK-NEXT: bsic %s10, (, %s12)
60 ; CHECK-NEXT: or %s0, 0, (0)1
61 ; CHECK-NEXT: ld %s33, 168(, %s9) # 8-byte Folded Reload
62 ; CHECK-NEXT: ld %s32, 160(, %s9) # 8-byte Folded Reload
63 ; CHECK-NEXT: ld %s31, 152(, %s9) # 8-byte Folded Reload
64 ; CHECK-NEXT: ld %s30, 144(, %s9) # 8-byte Folded Reload
65 ; CHECK-NEXT: ld %s29, 136(, %s9) # 8-byte Folded Reload
66 ; CHECK-NEXT: ld %s28, 128(, %s9) # 8-byte Folded Reload
67 ; CHECK-NEXT: ld %s27, 120(, %s9) # 8-byte Folded Reload
68 ; CHECK-NEXT: ld %s26, 112(, %s9) # 8-byte Folded Reload
69 ; CHECK-NEXT: ld %s25, 104(, %s9) # 8-byte Folded Reload
70 ; CHECK-NEXT: ld %s24, 96(, %s9) # 8-byte Folded Reload
71 ; CHECK-NEXT: ld %s23, 88(, %s9) # 8-byte Folded Reload
72 ; CHECK-NEXT: ld %s22, 80(, %s9) # 8-byte Folded Reload
73 ; CHECK-NEXT: ld %s21, 72(, %s9) # 8-byte Folded Reload
74 ; CHECK-NEXT: ld %s20, 64(, %s9) # 8-byte Folded Reload
75 ; CHECK-NEXT: ld %s19, 56(, %s9) # 8-byte Folded Reload
76 ; CHECK-NEXT: ld %s18, 48(, %s9) # 8-byte Folded Reload
77 ; CHECK-NEXT: or %s11, 0, %s9
78 %buf = alloca [5 x i8*], align 16
79 %p = alloca i8*, align 8
80 %q = alloca i8, align 64
81 %r = bitcast [5 x i8*]* %buf to i8*
82 %s = alloca i8, i64 %n, align 1
83 store i8* %s, i8** %p, align 8
84 %t = call i32 @llvm.eh.sjlj.setjmp(i8* %s)
85 call void @whatever(i64 %n, %Foo* %f, i8** %p, i8* %q, i8* %s, i32 %t) #1