1 ; RUN: llc < %s -mtriple=ve-unknown-unknown | FileCheck %s
3 %struct.a = type { i32, i32 }
5 @A = common global %struct.a zeroinitializer, align 4
7 ; Function Attrs: norecurse nounwind
8 define void @fun(ptr noalias nocapture sret(%struct.a) %a, i32 %p1, i32 %p2) {
11 ; CHECK-NEXT: stl %s1, (, %s0)
12 ; CHECK-NEXT: stl %s2, 4(, %s0)
13 ; CHECK-NEXT: b.l.t (, %s10)
14 store i32 %p1, ptr %a, align 4
15 %a.one = getelementptr inbounds %struct.a, ptr %a, i64 0, i32 1
16 store i32 %p2, ptr %a.one, align 4
20 ; Function Attrs: nounwind
21 define void @caller() {
22 ; CHECK-LABEL: caller:
23 ; CHECK: .LBB{{[0-9]+}}_2:
24 ; CHECK-NEXT: lea %s0, callee@lo
25 ; CHECK-NEXT: and %s0, %s0, (32)0
26 ; CHECK-NEXT: lea.sl %s12, callee@hi(, %s0)
27 ; CHECK-NEXT: lea %s0, 248(, %s11)
28 ; CHECK-NEXT: or %s1, 3, (0)1
29 ; CHECK-NEXT: or %s2, 4, (0)1
30 ; CHECK-NEXT: bsic %s10, (, %s12)
31 ; CHECK-NEXT: ld %s0, 248(, %s11)
32 ; CHECK-NEXT: lea %s1, A@lo
33 ; CHECK-NEXT: and %s1, %s1, (32)0
34 ; CHECK-NEXT: lea.sl %s1, A@hi(, %s1)
35 ; CHECK-NEXT: st %s0, (, %s1)
36 ; CHECK-NEXT: or %s11, 0, %s9
37 %a = alloca i64, align 8
38 call void @callee(ptr nonnull sret(%struct.a) %a, i32 3, i32 4)
39 %a.val = load i64, ptr %a, align 8
40 store i64 %a.val, ptr @A, align 4
44 declare void @callee(ptr sret(%struct.a), i32, i32)