1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -passes=rewrite-statepoints-for-gc -S 2>&1 | FileCheck %s
4 ; A collection of tests for exercising the base inference logic in the
5 ; findBasePointers. That is, the logic which proves a potentially derived
6 ; pointer is actually a base pointer itself.
8 define ptr addrspace(1) @test(ptr addrspace(1) %a) gc "statepoint-example" {
10 ; CHECK-NEXT: [[STATEPOINT_TOKEN:%.*]] = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr elementtype(void ()) @foo, i32 0, i32 0, i32 0, i32 0) [ "gc-live"(ptr addrspace(1) [[A:%.*]]) ]
11 ; CHECK-NEXT: [[A_RELOCATED:%.*]] = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token [[STATEPOINT_TOKEN]], i32 0, i32 0)
12 ; CHECK-NEXT: ret ptr addrspace(1) [[A_RELOCATED]]
15 ret ptr addrspace(1) %a
18 define ptr addrspace(1) @test_select(i1 %c, ptr addrspace(1) %a1, ptr addrspace(1) %a2) gc "statepoint-example" {
19 ; CHECK-LABEL: @test_select(
20 ; CHECK-NEXT: [[SEL:%.*]] = select i1 [[C:%.*]], ptr addrspace(1) [[A1:%.*]], ptr addrspace(1) [[A2:%.*]]
21 ; CHECK-NEXT: [[STATEPOINT_TOKEN:%.*]] = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr elementtype(void ()) @foo, i32 0, i32 0, i32 0, i32 0) [ "gc-live"(ptr addrspace(1) [[SEL]]) ]
22 ; CHECK-NEXT: [[SEL_RELOCATED:%.*]] = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token [[STATEPOINT_TOKEN]], i32 0, i32 0)
23 ; CHECK-NEXT: ret ptr addrspace(1) [[SEL_RELOCATED]]
25 %sel = select i1 %c, ptr addrspace(1) %a1, ptr addrspace(1) %a2
27 ret ptr addrspace(1) %sel
30 define ptr addrspace(1) @test_phi1(i1 %c, ptr addrspace(1) %a1, ptr addrspace(1) %a2) gc "statepoint-example" {
31 ; CHECK-LABEL: @test_phi1(
33 ; CHECK-NEXT: br i1 [[C:%.*]], label [[TAKEN:%.*]], label [[UNTAKEN:%.*]]
35 ; CHECK-NEXT: br label [[MERGE:%.*]]
37 ; CHECK-NEXT: br label [[MERGE]]
39 ; CHECK-NEXT: [[PHI:%.*]] = phi ptr addrspace(1) [ [[A1:%.*]], [[TAKEN]] ], [ [[A2:%.*]], [[UNTAKEN]] ]
40 ; CHECK-NEXT: [[STATEPOINT_TOKEN:%.*]] = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr elementtype(void ()) @foo, i32 0, i32 0, i32 0, i32 0) [ "gc-live"(ptr addrspace(1) [[PHI]]) ]
41 ; CHECK-NEXT: [[PHI_RELOCATED:%.*]] = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token [[STATEPOINT_TOKEN]], i32 0, i32 0)
42 ; CHECK-NEXT: ret ptr addrspace(1) [[PHI_RELOCATED]]
45 br i1 %c, label %taken, label %untaken
51 %phi = phi ptr addrspace(1) [%a1, %taken], [%a2, %untaken]
53 ret ptr addrspace(1) %phi
56 define ptr addrspace(1) @test_phi_lcssa(i1 %c, ptr addrspace(1) %a1, ptr addrspace(1) %a2) gc "statepoint-example" {
57 ; CHECK-LABEL: @test_phi_lcssa(
59 ; CHECK-NEXT: br label [[MERGE:%.*]]
61 ; CHECK-NEXT: [[STATEPOINT_TOKEN:%.*]] = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr elementtype(void ()) @foo, i32 0, i32 0, i32 0, i32 0) [ "gc-live"(ptr addrspace(1) [[A1:%.*]]) ]
62 ; CHECK-NEXT: [[A1_RELOCATED:%.*]] = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token [[STATEPOINT_TOKEN]], i32 0, i32 0)
63 ; CHECK-NEXT: ret ptr addrspace(1) [[A1_RELOCATED]]
68 %phi = phi ptr addrspace(1) [%a1, %entry]
70 ret ptr addrspace(1) %phi
74 define ptr addrspace(1) @test_loop1(i1 %c, ptr addrspace(1) %a1, ptr addrspace(1) %a2) gc "statepoint-example" {
75 ; CHECK-LABEL: @test_loop1(
77 ; CHECK-NEXT: br label [[LOOP:%.*]]
79 ; CHECK-NEXT: [[PHI:%.*]] = phi ptr addrspace(1) [ [[A1:%.*]], [[ENTRY:%.*]] ], [ [[A2:%.*]], [[LOOP]] ]
80 ; CHECK-NEXT: br i1 [[C:%.*]], label [[EXIT:%.*]], label [[LOOP]]
82 ; CHECK-NEXT: [[STATEPOINT_TOKEN:%.*]] = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr elementtype(void ()) @foo, i32 0, i32 0, i32 0, i32 0) [ "gc-live"(ptr addrspace(1) [[PHI]]) ]
83 ; CHECK-NEXT: [[PHI_RELOCATED:%.*]] = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token [[STATEPOINT_TOKEN]], i32 0, i32 0)
84 ; CHECK-NEXT: ret ptr addrspace(1) [[PHI_RELOCATED]]
89 %phi = phi ptr addrspace(1) [%a1, %entry], [%a2, %loop]
90 br i1 %c, label %exit, label %loop
92 %phi2 = phi ptr addrspace(1) [%phi, %loop]
94 ret ptr addrspace(1) %phi2
97 define ptr addrspace(1) @test_loop2(i1 %c, ptr addrspace(1) %a1) gc "statepoint-example" {
98 ; CHECK-LABEL: @test_loop2(
100 ; CHECK-NEXT: br label [[LOOP:%.*]]
102 ; CHECK-NEXT: [[PHI:%.*]] = phi ptr addrspace(1) [ [[A1:%.*]], [[ENTRY:%.*]] ], [ [[O2:%.*]], [[LOOP]] ]
103 ; CHECK-NEXT: [[O2]] = load ptr addrspace(1), ptr addrspace(1) [[PHI]], align 8
104 ; CHECK-NEXT: br i1 [[C:%.*]], label [[EXIT:%.*]], label [[LOOP]]
106 ; CHECK-NEXT: [[STATEPOINT_TOKEN:%.*]] = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr elementtype(void ()) @foo, i32 0, i32 0, i32 0, i32 0) [ "gc-live"(ptr addrspace(1) [[PHI]]) ]
107 ; CHECK-NEXT: [[PHI_RELOCATED:%.*]] = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token [[STATEPOINT_TOKEN]], i32 0, i32 0)
108 ; CHECK-NEXT: ret ptr addrspace(1) [[PHI_RELOCATED]]
113 %phi = phi ptr addrspace(1) [%a1, %entry], [%o2, %loop]
114 %o2 = load ptr addrspace(1), ptr addrspace(1) %phi
115 br i1 %c, label %exit, label %loop
117 %phi2 = phi ptr addrspace(1) [%phi, %loop]
119 ret ptr addrspace(1) %phi2
122 ; %phi1 and phi2 are not base pointers, but they do have a single
123 ; base pointer which is %a1
124 define ptr addrspace(1) @test_loop3(i1 %c, ptr addrspace(1) %a1) gc "statepoint-example" {
125 ; CHECK-LABEL: @test_loop3(
127 ; CHECK-NEXT: br label [[LOOP:%.*]]
129 ; CHECK-NEXT: [[PHI:%.*]] = phi ptr addrspace(1) [ [[A1:%.*]], [[ENTRY:%.*]] ], [ [[GEP:%.*]], [[LOOP]] ]
130 ; CHECK-NEXT: [[GEP]] = getelementptr i8, ptr addrspace(1) [[PHI]], i64 16
131 ; CHECK-NEXT: br i1 [[C:%.*]], label [[EXIT:%.*]], label [[LOOP]]
133 ; CHECK-NEXT: [[STATEPOINT_TOKEN:%.*]] = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr elementtype(void ()) @foo, i32 0, i32 0, i32 0, i32 0) [ "gc-live"(ptr addrspace(1) [[PHI]], ptr addrspace(1) [[A1]]) ]
134 ; CHECK-NEXT: [[PHI_RELOCATED:%.*]] = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token [[STATEPOINT_TOKEN]], i32 1, i32 0)
135 ; CHECK-NEXT: [[A1_RELOCATED:%.*]] = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token [[STATEPOINT_TOKEN]], i32 1, i32 1)
136 ; CHECK-NEXT: ret ptr addrspace(1) [[PHI_RELOCATED]]
141 %phi = phi ptr addrspace(1) [%a1, %entry], [%gep, %loop]
142 %gep = getelementptr i8, ptr addrspace(1) %phi, i64 16
143 br i1 %c, label %exit, label %loop
145 %phi2 = phi ptr addrspace(1) [%phi, %loop]
147 ret ptr addrspace(1) %phi2
150 define <2 x ptr addrspace(1)> @test_vec_passthrough(<2 x ptr addrspace(1)> %a) gc "statepoint-example" {
151 ; CHECK-LABEL: @test_vec_passthrough(
152 ; CHECK-NEXT: [[STATEPOINT_TOKEN:%.*]] = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr elementtype(void ()) @foo, i32 0, i32 0, i32 0, i32 0) [ "gc-live"(<2 x ptr addrspace(1)> [[A:%.*]]) ]
153 ; CHECK-NEXT: [[A_RELOCATED:%.*]] = call coldcc <2 x ptr addrspace(1)> @llvm.experimental.gc.relocate.v2p1(token [[STATEPOINT_TOKEN]], i32 0, i32 0)
154 ; CHECK-NEXT: ret <2 x ptr addrspace(1)> [[A_RELOCATED]]
157 ret <2 x ptr addrspace(1)> %a
161 define <2 x ptr addrspace(1)> @test_insert(ptr addrspace(1) %a) gc "statepoint-example" {
162 ; CHECK-LABEL: @test_insert(
163 ; CHECK-NEXT: [[VEC:%.*]] = insertelement <2 x ptr addrspace(1)> zeroinitializer, ptr addrspace(1) [[A:%.*]], i64 0
164 ; CHECK-NEXT: [[STATEPOINT_TOKEN:%.*]] = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr elementtype(void ()) @foo, i32 0, i32 0, i32 0, i32 0) [ "gc-live"(<2 x ptr addrspace(1)> [[VEC]]) ]
165 ; CHECK-NEXT: [[VEC_RELOCATED:%.*]] = call coldcc <2 x ptr addrspace(1)> @llvm.experimental.gc.relocate.v2p1(token [[STATEPOINT_TOKEN]], i32 0, i32 0)
166 ; CHECK-NEXT: ret <2 x ptr addrspace(1)> [[VEC_RELOCATED]]
168 %vec = insertelement <2 x ptr addrspace(1)> zeroinitializer, ptr addrspace(1) %a, i64 0
170 ret <2 x ptr addrspace(1)> %vec
173 define ptr addrspace(1) @test_extract(<2 x ptr addrspace(1)> %a) gc "statepoint-example" {
174 ; CHECK-LABEL: @test_extract(
175 ; CHECK-NEXT: [[EE:%.*]] = extractelement <2 x ptr addrspace(1)> [[A:%.*]], i64 0
176 ; CHECK-NEXT: [[STATEPOINT_TOKEN:%.*]] = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr elementtype(void ()) @foo, i32 0, i32 0, i32 0, i32 0) [ "gc-live"(ptr addrspace(1) [[EE]]) ]
177 ; CHECK-NEXT: [[EE_RELOCATED:%.*]] = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token [[STATEPOINT_TOKEN]], i32 0, i32 0)
178 ; CHECK-NEXT: ret ptr addrspace(1) [[EE_RELOCATED]]
180 %ee = extractelement <2 x ptr addrspace(1)> %a, i64 0
182 ret ptr addrspace(1) %ee
185 define <2 x ptr addrspace(1)> @test_shuffle(<2 x ptr addrspace(1)> %a1) gc "statepoint-example" {
186 ; CHECK-LABEL: @test_shuffle(
187 ; CHECK-NEXT: [[RES:%.*]] = shufflevector <2 x ptr addrspace(1)> [[A1:%.*]], <2 x ptr addrspace(1)> [[A1]], <2 x i32> zeroinitializer
188 ; CHECK-NEXT: [[STATEPOINT_TOKEN:%.*]] = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr elementtype(void ()) @foo, i32 0, i32 0, i32 0, i32 0) [ "gc-live"(<2 x ptr addrspace(1)> [[RES]]) ]
189 ; CHECK-NEXT: [[RES_RELOCATED:%.*]] = call coldcc <2 x ptr addrspace(1)> @llvm.experimental.gc.relocate.v2p1(token [[STATEPOINT_TOKEN]], i32 0, i32 0)
190 ; CHECK-NEXT: ret <2 x ptr addrspace(1)> [[RES_RELOCATED]]
192 %res = shufflevector <2 x ptr addrspace(1)> %a1, <2 x ptr addrspace(1)> %a1, <2 x i32> zeroinitializer
194 ret <2 x ptr addrspace(1)> %res
197 define <2 x ptr addrspace(1)> @test_shuffle2(<2 x ptr addrspace(1)> %a1, <2 x ptr addrspace(1)> %a2) gc "statepoint-example" {
198 ; CHECK-LABEL: @test_shuffle2(
199 ; CHECK-NEXT: [[RES:%.*]] = shufflevector <2 x ptr addrspace(1)> [[A1:%.*]], <2 x ptr addrspace(1)> [[A2:%.*]], <2 x i32> zeroinitializer
200 ; CHECK-NEXT: [[STATEPOINT_TOKEN:%.*]] = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr elementtype(void ()) @foo, i32 0, i32 0, i32 0, i32 0) [ "gc-live"(<2 x ptr addrspace(1)> [[RES]]) ]
201 ; CHECK-NEXT: [[RES_RELOCATED:%.*]] = call coldcc <2 x ptr addrspace(1)> @llvm.experimental.gc.relocate.v2p1(token [[STATEPOINT_TOKEN]], i32 0, i32 0)
202 ; CHECK-NEXT: ret <2 x ptr addrspace(1)> [[RES_RELOCATED]]
204 %res = shufflevector <2 x ptr addrspace(1)> %a1, <2 x ptr addrspace(1)> %a2, <2 x i32> zeroinitializer
206 ret <2 x ptr addrspace(1)> %res
209 define <4 x ptr addrspace(1)> @test_shuffle_concat(<2 x ptr addrspace(1)> %a1, <2 x ptr addrspace(1)> %a2) gc "statepoint-example" {
210 ; CHECK-LABEL: @test_shuffle_concat(
211 ; CHECK-NEXT: [[RES:%.*]] = shufflevector <2 x ptr addrspace(1)> [[A1:%.*]], <2 x ptr addrspace(1)> [[A2:%.*]], <4 x i32> <i32 0, i32 1, i32 2, i32 3>
212 ; CHECK-NEXT: [[STATEPOINT_TOKEN:%.*]] = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr elementtype(void ()) @foo, i32 0, i32 0, i32 0, i32 0) [ "gc-live"(<4 x ptr addrspace(1)> [[RES]]) ]
213 ; CHECK-NEXT: [[RES_RELOCATED:%.*]] = call coldcc <4 x ptr addrspace(1)> @llvm.experimental.gc.relocate.v4p1(token [[STATEPOINT_TOKEN]], i32 0, i32 0)
214 ; CHECK-NEXT: ret <4 x ptr addrspace(1)> [[RES_RELOCATED]]
216 %res = shufflevector <2 x ptr addrspace(1)> %a1, <2 x ptr addrspace(1)> %a2, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
218 ret <4 x ptr addrspace(1)> %res
221 ; TODO: Special case worth handling - we interpret the shuffle as if we need
222 ; to select the base pointers from either input when the mask is known.
223 define <2 x ptr addrspace(1)> @test_shuffle_broadcast(ptr addrspace(1) %a) gc "statepoint-example" {
224 ; CHECK-LABEL: @test_shuffle_broadcast(
226 ; CHECK-NEXT: [[IE:%.*]] = insertelement <2 x ptr addrspace(1)> zeroinitializer, ptr addrspace(1) [[A:%.*]], i64 0
227 ; CHECK-NEXT: [[BROADCAST:%.*]] = shufflevector <2 x ptr addrspace(1)> [[IE]], <2 x ptr addrspace(1)> undef, <2 x i32> zeroinitializer
228 ; CHECK-NEXT: [[STATEPOINT_TOKEN:%.*]] = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr elementtype(void ()) @foo, i32 0, i32 0, i32 0, i32 0) [ "gc-live"(<2 x ptr addrspace(1)> [[BROADCAST]]) ]
229 ; CHECK-NEXT: [[BROADCAST_RELOCATED:%.*]] = call coldcc <2 x ptr addrspace(1)> @llvm.experimental.gc.relocate.v2p1(token [[STATEPOINT_TOKEN]], i32 0, i32 0)
230 ; CHECK-NEXT: ret <2 x ptr addrspace(1)> [[BROADCAST_RELOCATED]]
233 %ie = insertelement <2 x ptr addrspace(1)> zeroinitializer, ptr addrspace(1) %a, i64 0
234 %broadcast = shufflevector <2 x ptr addrspace(1)> %ie, <2 x ptr addrspace(1)> undef, <2 x i32> zeroinitializer
236 ret <2 x ptr addrspace(1)> %broadcast
239 ; Show a case where only a portion of the sub-graph propagates base pointers.
240 define i8 @test_subgraph(i1 %c, ptr addrspace(1) %a1, ptr addrspace(1) %a2) gc "statepoint-example" {
241 ; CHECK-LABEL: @test_subgraph(
243 ; CHECK-NEXT: [[SEL:%.*]] = select i1 [[C:%.*]], ptr addrspace(1) [[A1:%.*]], ptr addrspace(1) [[A2:%.*]]
244 ; CHECK-NEXT: br i1 [[C]], label [[TAKEN:%.*]], label [[MERGE:%.*]]
246 ; CHECK-NEXT: [[GEP:%.*]] = getelementptr i8, ptr addrspace(1) [[SEL]], i64 8
247 ; CHECK-NEXT: br label [[MERGE]]
249 ; CHECK-NEXT: [[PHI:%.*]] = phi ptr addrspace(1) [ [[GEP]], [[TAKEN]] ], [ [[SEL]], [[ENTRY:%.*]] ]
250 ; CHECK-NEXT: [[STATEPOINT_TOKEN:%.*]] = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr elementtype(void ()) @foo, i32 0, i32 0, i32 0, i32 0) [ "gc-live"(ptr addrspace(1) [[PHI]], ptr addrspace(1) [[SEL]]) ]
251 ; CHECK-NEXT: [[PHI_RELOCATED:%.*]] = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token [[STATEPOINT_TOKEN]], i32 1, i32 0)
252 ; CHECK-NEXT: [[SEL_RELOCATED:%.*]] = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token [[STATEPOINT_TOKEN]], i32 1, i32 1)
253 ; CHECK-NEXT: [[RES:%.*]] = load i8, ptr addrspace(1) [[PHI_RELOCATED]], align 1
254 ; CHECK-NEXT: ret i8 [[RES]]
257 %sel = select i1 %c, ptr addrspace(1) %a1, ptr addrspace(1) %a2
258 br i1 %c, label %taken, label %merge
260 %gep = getelementptr i8, ptr addrspace(1) %sel, i64 8
263 %phi = phi ptr addrspace(1) [%gep, %taken], [%sel, %entry]
265 %res = load i8, ptr addrspace(1) %phi
269 ; An example of a non-trivial subgraph computing base pointers.
270 define i8 @test_subgraph2(i1 %c, ptr addrspace(1) %a1, ptr addrspace(1) %a2) gc "statepoint-example" {
271 ; CHECK-LABEL: @test_subgraph2(
273 ; CHECK-NEXT: [[SEL:%.*]] = select i1 [[C:%.*]], ptr addrspace(1) [[A1:%.*]], ptr addrspace(1) [[A2:%.*]]
274 ; CHECK-NEXT: [[IE:%.*]] = insertelement <2 x ptr addrspace(1)> zeroinitializer, ptr addrspace(1) [[SEL]], i64 0
275 ; CHECK-NEXT: [[BROADCAST:%.*]] = shufflevector <2 x ptr addrspace(1)> [[IE]], <2 x ptr addrspace(1)> [[IE]], <2 x i32> zeroinitializer
276 ; CHECK-NEXT: [[EE:%.*]] = extractelement <2 x ptr addrspace(1)> [[BROADCAST]], i32 1
277 ; CHECK-NEXT: [[STATEPOINT_TOKEN:%.*]] = call token (i64, i32, ptr, i32, i32, ...) @llvm.experimental.gc.statepoint.p0(i64 2882400000, i32 0, ptr elementtype(void ()) @foo, i32 0, i32 0, i32 0, i32 0) [ "gc-live"(ptr addrspace(1) [[EE]]) ]
278 ; CHECK-NEXT: [[EE_RELOCATED:%.*]] = call coldcc ptr addrspace(1) @llvm.experimental.gc.relocate.p1(token [[STATEPOINT_TOKEN]], i32 0, i32 0)
279 ; CHECK-NEXT: [[RES:%.*]] = load i8, ptr addrspace(1) [[EE_RELOCATED]], align 1
280 ; CHECK-NEXT: ret i8 [[RES]]
283 %sel = select i1 %c, ptr addrspace(1) %a1, ptr addrspace(1) %a2
284 %ie = insertelement <2 x ptr addrspace(1)> zeroinitializer, ptr addrspace(1) %sel, i64 0
285 %broadcast = shufflevector <2 x ptr addrspace(1)> %ie, <2 x ptr addrspace(1)> %ie, <2 x i32> zeroinitializer
286 %ee = extractelement <2 x ptr addrspace(1)> %broadcast, i32 1
288 %res = load i8, ptr addrspace(1) %ee