1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=ve | FileCheck %s
3 ; RUN: llc < %s -mtriple=ve -relocation-model=pic \
4 ; RUN: | FileCheck -check-prefix=PIC %s
9 ; CHECK-NEXT: b.l.t (, %s10)
13 ; PIC-NEXT: b.l.t (, %s10)
18 @vi8 = common dso_local local_unnamed_addr global i8 0, align 1
20 define i8 @func_gv() {
21 ; CHECK-LABEL: func_gv:
23 ; CHECK-NEXT: lea %s0, vi8@lo
24 ; CHECK-NEXT: and %s0, %s0, (32)0
25 ; CHECK-NEXT: lea.sl %s0, vi8@hi(, %s0)
26 ; CHECK-NEXT: ld1b.zx %s0, (, %s0)
27 ; CHECK-NEXT: b.l.t (, %s10)
31 ; PIC-NEXT: st %s15, 24(, %s11)
32 ; PIC-NEXT: st %s16, 32(, %s11)
33 ; PIC-NEXT: lea %s15, _GLOBAL_OFFSET_TABLE_@pc_lo(-24)
34 ; PIC-NEXT: and %s15, %s15, (32)0
36 ; PIC-NEXT: lea.sl %s15, _GLOBAL_OFFSET_TABLE_@pc_hi(%s16, %s15)
37 ; PIC-NEXT: lea %s0, vi8@got_lo
38 ; PIC-NEXT: and %s0, %s0, (32)0
39 ; PIC-NEXT: lea.sl %s0, vi8@got_hi(, %s0)
40 ; PIC-NEXT: ld %s0, (%s0, %s15)
41 ; PIC-NEXT: ld1b.zx %s0, (, %s0)
42 ; PIC-NEXT: ld %s16, 32(, %s11)
43 ; PIC-NEXT: ld %s15, 24(, %s11)
44 ; PIC-NEXT: b.l.t (, %s10)
46 %v = load i8, ptr @vi8, align 1
50 define i32 @func_alloca(i32 signext %0) {
51 ; CHECK-LABEL: func_alloca:
53 ; CHECK-NEXT: adds.l %s11, -16, %s11
54 ; CHECK-NEXT: brge.l.t %s11, %s8, .LBB2_2
55 ; CHECK-NEXT: # %bb.1:
56 ; CHECK-NEXT: ld %s61, 24(, %s14)
57 ; CHECK-NEXT: or %s62, 0, %s0
58 ; CHECK-NEXT: lea %s63, 315
59 ; CHECK-NEXT: shm.l %s63, (%s61)
60 ; CHECK-NEXT: shm.l %s8, 8(%s61)
61 ; CHECK-NEXT: shm.l %s11, 16(%s61)
63 ; CHECK-NEXT: or %s0, 0, %s62
64 ; CHECK-NEXT: .LBB2_2:
65 ; CHECK-NEXT: stl %s0, 12(, %s11)
66 ; CHECK-NEXT: adds.l %s11, 16, %s11
67 ; CHECK-NEXT: b.l.t (, %s10)
69 ; PIC-LABEL: func_alloca:
71 ; PIC-NEXT: adds.l %s11, -16, %s11
72 ; PIC-NEXT: brge.l.t %s11, %s8, .LBB2_2
74 ; PIC-NEXT: ld %s61, 24(, %s14)
75 ; PIC-NEXT: or %s62, 0, %s0
76 ; PIC-NEXT: lea %s63, 315
77 ; PIC-NEXT: shm.l %s63, (%s61)
78 ; PIC-NEXT: shm.l %s8, 8(%s61)
79 ; PIC-NEXT: shm.l %s11, 16(%s61)
81 ; PIC-NEXT: or %s0, 0, %s62
83 ; PIC-NEXT: stl %s0, 12(, %s11)
84 ; PIC-NEXT: adds.l %s11, 16, %s11
85 ; PIC-NEXT: b.l.t (, %s10)
86 %2 = alloca i32, align 4
87 store i32 %0, ptr %2, align 4
88 %3 = load i32, ptr %2, align 4