1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ;; Check that the function regex for VE works as expected.
3 ; RUN: llc -mtriple=ve -exception-model=sjlj -relocation-model=static < %s | FileCheck %s
5 ;; Check that we accept .Ldsolocal$local: below the function label.
6 ; RUN: llc -mtriple=ve -exception-model=sjlj -relocation-model=pic < %s | FileCheck %s --check-prefix=PIC
9 @gv0 = dso_local global i32 0, align 4
10 @gv1 = dso_preemptable global i32 0, align 4
12 define hidden i32 @"_Z54bar$ompvariant$bar"() {
17 define dso_local i32 @dsolocal() {
18 ; CHECK-LABEL: dsolocal:
19 ; CHECK: # %bb.0: # %entry
20 ; CHECK-NEXT: st %s9, (, %s11)
21 ; CHECK-NEXT: st %s10, 8(, %s11)
22 ; CHECK-NEXT: or %s9, 0, %s11
23 ; CHECK-NEXT: lea %s11, -240(, %s11)
24 ; CHECK-NEXT: brge.l.t %s11, %s8, .LBB1_2
25 ; CHECK-NEXT: # %bb.1: # %entry
26 ; CHECK-NEXT: ld %s61, 24(, %s14)
27 ; CHECK-NEXT: or %s62, 0, %s0
28 ; CHECK-NEXT: lea %s63, 315
29 ; CHECK-NEXT: shm.l %s63, (%s61)
30 ; CHECK-NEXT: shm.l %s8, 8(%s61)
31 ; CHECK-NEXT: shm.l %s11, 16(%s61)
33 ; CHECK-NEXT: or %s0, 0, %s62
34 ; CHECK-NEXT: .LBB1_2: # %entry
35 ; CHECK-NEXT: lea %s0, ext@lo
36 ; CHECK-NEXT: and %s0, %s0, (32)0
37 ; CHECK-NEXT: lea.sl %s12, ext@hi(, %s0)
38 ; CHECK-NEXT: bsic %s10, (, %s12)
39 ; CHECK-NEXT: or %s0, 2, (0)1
40 ; CHECK-NEXT: or %s11, 0, %s9
41 ; CHECK-NEXT: ld %s10, 8(, %s11)
42 ; CHECK-NEXT: ld %s9, (, %s11)
43 ; CHECK-NEXT: b.l.t (, %s10)
45 ; PIC-LABEL: dsolocal:
46 ; PIC: # %bb.0: # %entry
47 ; PIC-NEXT: st %s9, (, %s11)
48 ; PIC-NEXT: st %s10, 8(, %s11)
49 ; PIC-NEXT: st %s15, 24(, %s11)
50 ; PIC-NEXT: st %s16, 32(, %s11)
51 ; PIC-NEXT: or %s9, 0, %s11
52 ; PIC-NEXT: lea %s11, -240(, %s11)
53 ; PIC-NEXT: brge.l.t %s11, %s8, .LBB1_2
54 ; PIC-NEXT: # %bb.1: # %entry
55 ; PIC-NEXT: ld %s61, 24(, %s14)
56 ; PIC-NEXT: or %s62, 0, %s0
57 ; PIC-NEXT: lea %s63, 315
58 ; PIC-NEXT: shm.l %s63, (%s61)
59 ; PIC-NEXT: shm.l %s8, 8(%s61)
60 ; PIC-NEXT: shm.l %s11, 16(%s61)
62 ; PIC-NEXT: or %s0, 0, %s62
63 ; PIC-NEXT: .LBB1_2: # %entry
64 ; PIC-NEXT: lea %s15, _GLOBAL_OFFSET_TABLE_@pc_lo(-24)
65 ; PIC-NEXT: and %s15, %s15, (32)0
67 ; PIC-NEXT: lea.sl %s15, _GLOBAL_OFFSET_TABLE_@pc_hi(%s16, %s15)
68 ; PIC-NEXT: lea %s12, ext@plt_lo(-24)
69 ; PIC-NEXT: and %s12, %s12, (32)0
71 ; PIC-NEXT: lea.sl %s12, ext@plt_hi(%s16, %s12)
72 ; PIC-NEXT: bsic %s10, (, %s12)
73 ; PIC-NEXT: or %s0, 2, (0)1
74 ; PIC-NEXT: or %s11, 0, %s9
75 ; PIC-NEXT: ld %s16, 32(, %s11)
76 ; PIC-NEXT: ld %s15, 24(, %s11)
77 ; PIC-NEXT: ld %s10, 8(, %s11)
78 ; PIC-NEXT: ld %s9, (, %s11)
79 ; PIC-NEXT: b.l.t (, %s10)
89 ; CHECK: # %bb.0: # %entry
90 ; CHECK-NEXT: lea %s0, gv0@lo
91 ; CHECK-NEXT: and %s0, %s0, (32)0
92 ; CHECK-NEXT: lea.sl %s0, gv0@hi(, %s0)
93 ; CHECK-NEXT: ldl.sx %s0, (, %s0)
94 ; CHECK-NEXT: lea %s1, gv1@lo
95 ; CHECK-NEXT: and %s1, %s1, (32)0
96 ; CHECK-NEXT: lea.sl %s1, gv1@hi(, %s1)
97 ; CHECK-NEXT: ldl.sx %s1, (, %s1)
98 ; CHECK-NEXT: adds.w.sx %s0, %s0, %s1
99 ; CHECK-NEXT: b.l.t (, %s10)
102 ; PIC: # %bb.0: # %entry
103 ; PIC-NEXT: st %s15, 24(, %s11)
104 ; PIC-NEXT: st %s16, 32(, %s11)
105 ; PIC-NEXT: lea %s15, _GLOBAL_OFFSET_TABLE_@pc_lo(-24)
106 ; PIC-NEXT: and %s15, %s15, (32)0
108 ; PIC-NEXT: lea.sl %s15, _GLOBAL_OFFSET_TABLE_@pc_hi(%s16, %s15)
109 ; PIC-NEXT: lea %s0, gv0@got_lo
110 ; PIC-NEXT: and %s0, %s0, (32)0
111 ; PIC-NEXT: lea.sl %s0, gv0@got_hi(, %s0)
112 ; PIC-NEXT: ld %s0, (%s0, %s15)
113 ; PIC-NEXT: lea %s1, gv1@got_lo
114 ; PIC-NEXT: and %s1, %s1, (32)0
115 ; PIC-NEXT: lea.sl %s1, gv1@got_hi(, %s1)
116 ; PIC-NEXT: ld %s1, (%s1, %s15)
117 ; PIC-NEXT: ldl.sx %s0, (, %s0)
118 ; PIC-NEXT: ldl.sx %s1, (, %s1)
119 ; PIC-NEXT: adds.w.sx %s0, %s0, %s1
120 ; PIC-NEXT: ld %s16, 32(, %s11)
121 ; PIC-NEXT: ld %s15, 24(, %s11)
122 ; PIC-NEXT: b.l.t (, %s10)
124 %a = load i32, i32* @gv0
125 %b = load i32, i32* @gv1