12
12
define void @test_sinkable_flat_small_offset_i32 (ptr %out , ptr %in , i32 %cond ) {
13
13
; OPT-GFX7-LABEL: @test_sinkable_flat_small_offset_i32(
14
14
; OPT-GFX7-NEXT: entry:
15
- ; OPT-GFX7-NEXT: [[OUT_GEP:%.*]] = getelementptr i32, ptr [[OUT:%.*]], i64 999999
16
- ; OPT-GFX7-NEXT: [[IN_GEP:%.*]] = getelementptr i32, ptr [[IN:%.*]], i64 7
15
+ ; OPT-GFX7-NEXT: [[OUT_GEP:%.*]] = getelementptr inbounds i32, ptr [[OUT:%.*]], i64 999999
16
+ ; OPT-GFX7-NEXT: [[IN_GEP:%.*]] = getelementptr inbounds i32, ptr [[IN:%.*]], i64 7
17
17
; OPT-GFX7-NEXT: [[CMP0:%.*]] = icmp eq i32 [[COND:%.*]], 0
18
18
; OPT-GFX7-NEXT: br i1 [[CMP0]], label [[ENDIF:%.*]], label [[IF:%.*]]
19
19
; OPT-GFX7: if:
@@ -28,8 +28,8 @@ define void @test_sinkable_flat_small_offset_i32(ptr %out, ptr %in, i32 %cond) {
28
28
;
29
29
; OPT-GFX8-LABEL: @test_sinkable_flat_small_offset_i32(
30
30
; OPT-GFX8-NEXT: entry:
31
- ; OPT-GFX8-NEXT: [[OUT_GEP:%.*]] = getelementptr i32, ptr [[OUT:%.*]], i64 999999
32
- ; OPT-GFX8-NEXT: [[IN_GEP:%.*]] = getelementptr i32, ptr [[IN:%.*]], i64 7
31
+ ; OPT-GFX8-NEXT: [[OUT_GEP:%.*]] = getelementptr inbounds i32, ptr [[OUT:%.*]], i64 999999
32
+ ; OPT-GFX8-NEXT: [[IN_GEP:%.*]] = getelementptr inbounds i32, ptr [[IN:%.*]], i64 7
33
33
; OPT-GFX8-NEXT: [[CMP0:%.*]] = icmp eq i32 [[COND:%.*]], 0
34
34
; OPT-GFX8-NEXT: br i1 [[CMP0]], label [[ENDIF:%.*]], label [[IF:%.*]]
35
35
; OPT-GFX8: if:
@@ -44,11 +44,11 @@ define void @test_sinkable_flat_small_offset_i32(ptr %out, ptr %in, i32 %cond) {
44
44
;
45
45
; OPT-GFX9-LABEL: @test_sinkable_flat_small_offset_i32(
46
46
; OPT-GFX9-NEXT: entry:
47
- ; OPT-GFX9-NEXT: [[OUT_GEP:%.*]] = getelementptr i32, ptr [[OUT:%.*]], i64 999999
47
+ ; OPT-GFX9-NEXT: [[OUT_GEP:%.*]] = getelementptr inbounds i32, ptr [[OUT:%.*]], i64 999999
48
48
; OPT-GFX9-NEXT: [[CMP0:%.*]] = icmp eq i32 [[COND:%.*]], 0
49
49
; OPT-GFX9-NEXT: br i1 [[CMP0]], label [[ENDIF:%.*]], label [[IF:%.*]]
50
50
; OPT-GFX9: if:
51
- ; OPT-GFX9-NEXT: [[SUNKADDR:%.*]] = getelementptr i8, ptr [[IN:%.*]], i64 28
51
+ ; OPT-GFX9-NEXT: [[SUNKADDR:%.*]] = getelementptr inbounds i8, ptr [[IN:%.*]], i64 28
52
52
; OPT-GFX9-NEXT: [[LOAD:%.*]] = load i32, ptr [[SUNKADDR]], align 4
53
53
; OPT-GFX9-NEXT: br label [[ENDIF]]
54
54
; OPT-GFX9: endif:
@@ -58,11 +58,11 @@ define void @test_sinkable_flat_small_offset_i32(ptr %out, ptr %in, i32 %cond) {
58
58
;
59
59
; OPT-GFX10-LABEL: @test_sinkable_flat_small_offset_i32(
60
60
; OPT-GFX10-NEXT: entry:
61
- ; OPT-GFX10-NEXT: [[OUT_GEP:%.*]] = getelementptr i32, ptr [[OUT:%.*]], i64 999999
61
+ ; OPT-GFX10-NEXT: [[OUT_GEP:%.*]] = getelementptr inbounds i32, ptr [[OUT:%.*]], i64 999999
62
62
; OPT-GFX10-NEXT: [[CMP0:%.*]] = icmp eq i32 [[COND:%.*]], 0
63
63
; OPT-GFX10-NEXT: br i1 [[CMP0]], label [[ENDIF:%.*]], label [[IF:%.*]]
64
64
; OPT-GFX10: if:
65
- ; OPT-GFX10-NEXT: [[SUNKADDR:%.*]] = getelementptr i8, ptr [[IN:%.*]], i64 28
65
+ ; OPT-GFX10-NEXT: [[SUNKADDR:%.*]] = getelementptr inbounds i8, ptr [[IN:%.*]], i64 28
66
66
; OPT-GFX10-NEXT: [[LOAD:%.*]] = load i32, ptr [[SUNKADDR]], align 4
67
67
; OPT-GFX10-NEXT: br label [[ENDIF]]
68
68
; OPT-GFX10: endif:
@@ -146,8 +146,8 @@ define void @test_sinkable_flat_small_offset_i32(ptr %out, ptr %in, i32 %cond) {
146
146
; GFX10-NEXT: s_waitcnt lgkmcnt(0)
147
147
; GFX10-NEXT: s_setpc_b64 s[30:31]
148
148
entry:
149
- %out.gep = getelementptr i32 , ptr %out , i64 999999
150
- %in.gep = getelementptr i32 , ptr %in , i64 7
149
+ %out.gep = getelementptr inbounds i32 , ptr %out , i64 999999
150
+ %in.gep = getelementptr inbounds i32 , ptr %in , i64 7
151
151
%cmp0 = icmp eq i32 %cond , 0
152
152
br i1 %cmp0 , label %endif , label %if
153
153
@@ -167,12 +167,12 @@ done:
167
167
define void @test_sink_noop_addrspacecast_flat_to_global_i32 (ptr %out , ptr %in , i32 %cond ) {
168
168
; OPT-GFX7-LABEL: @test_sink_noop_addrspacecast_flat_to_global_i32(
169
169
; OPT-GFX7-NEXT: entry:
170
- ; OPT-GFX7-NEXT: [[OUT_GEP:%.*]] = getelementptr i32, ptr [[OUT:%.*]], i64 999999
170
+ ; OPT-GFX7-NEXT: [[OUT_GEP:%.*]] = getelementptr inbounds i32, ptr [[OUT:%.*]], i64 999999
171
171
; OPT-GFX7-NEXT: [[CMP0:%.*]] = icmp eq i32 [[COND:%.*]], 0
172
172
; OPT-GFX7-NEXT: br i1 [[CMP0]], label [[ENDIF:%.*]], label [[IF:%.*]]
173
173
; OPT-GFX7: if:
174
174
; OPT-GFX7-NEXT: [[TMP0:%.*]] = addrspacecast ptr [[IN:%.*]] to ptr addrspace(1)
175
- ; OPT-GFX7-NEXT: [[SUNKADDR:%.*]] = getelementptr i8, ptr addrspace(1) [[TMP0]], i64 28
175
+ ; OPT-GFX7-NEXT: [[SUNKADDR:%.*]] = getelementptr inbounds i8, ptr addrspace(1) [[TMP0]], i64 28
176
176
; OPT-GFX7-NEXT: [[LOAD:%.*]] = load i32, ptr addrspace(1) [[SUNKADDR]], align 4
177
177
; OPT-GFX7-NEXT: br label [[ENDIF]]
178
178
; OPT-GFX7: endif:
@@ -182,8 +182,8 @@ define void @test_sink_noop_addrspacecast_flat_to_global_i32(ptr %out, ptr %in,
182
182
;
183
183
; OPT-GFX8-LABEL: @test_sink_noop_addrspacecast_flat_to_global_i32(
184
184
; OPT-GFX8-NEXT: entry:
185
- ; OPT-GFX8-NEXT: [[OUT_GEP:%.*]] = getelementptr i32, ptr [[OUT:%.*]], i64 999999
186
- ; OPT-GFX8-NEXT: [[IN_GEP:%.*]] = getelementptr i32, ptr [[IN:%.*]], i64 7
185
+ ; OPT-GFX8-NEXT: [[OUT_GEP:%.*]] = getelementptr inbounds i32, ptr [[OUT:%.*]], i64 999999
186
+ ; OPT-GFX8-NEXT: [[IN_GEP:%.*]] = getelementptr inbounds i32, ptr [[IN:%.*]], i64 7
187
187
; OPT-GFX8-NEXT: [[CMP0:%.*]] = icmp eq i32 [[COND:%.*]], 0
188
188
; OPT-GFX8-NEXT: br i1 [[CMP0]], label [[ENDIF:%.*]], label [[IF:%.*]]
189
189
; OPT-GFX8: if:
@@ -197,12 +197,12 @@ define void @test_sink_noop_addrspacecast_flat_to_global_i32(ptr %out, ptr %in,
197
197
;
198
198
; OPT-GFX9-LABEL: @test_sink_noop_addrspacecast_flat_to_global_i32(
199
199
; OPT-GFX9-NEXT: entry:
200
- ; OPT-GFX9-NEXT: [[OUT_GEP:%.*]] = getelementptr i32, ptr [[OUT:%.*]], i64 999999
200
+ ; OPT-GFX9-NEXT: [[OUT_GEP:%.*]] = getelementptr inbounds i32, ptr [[OUT:%.*]], i64 999999
201
201
; OPT-GFX9-NEXT: [[CMP0:%.*]] = icmp eq i32 [[COND:%.*]], 0
202
202
; OPT-GFX9-NEXT: br i1 [[CMP0]], label [[ENDIF:%.*]], label [[IF:%.*]]
203
203
; OPT-GFX9: if:
204
204
; OPT-GFX9-NEXT: [[TMP0:%.*]] = addrspacecast ptr [[IN:%.*]] to ptr addrspace(1)
205
- ; OPT-GFX9-NEXT: [[SUNKADDR:%.*]] = getelementptr i8, ptr addrspace(1) [[TMP0]], i64 28
205
+ ; OPT-GFX9-NEXT: [[SUNKADDR:%.*]] = getelementptr inbounds i8, ptr addrspace(1) [[TMP0]], i64 28
206
206
; OPT-GFX9-NEXT: [[LOAD:%.*]] = load i32, ptr addrspace(1) [[SUNKADDR]], align 4
207
207
; OPT-GFX9-NEXT: br label [[ENDIF]]
208
208
; OPT-GFX9: endif:
@@ -212,12 +212,12 @@ define void @test_sink_noop_addrspacecast_flat_to_global_i32(ptr %out, ptr %in,
212
212
;
213
213
; OPT-GFX10-LABEL: @test_sink_noop_addrspacecast_flat_to_global_i32(
214
214
; OPT-GFX10-NEXT: entry:
215
- ; OPT-GFX10-NEXT: [[OUT_GEP:%.*]] = getelementptr i32, ptr [[OUT:%.*]], i64 999999
215
+ ; OPT-GFX10-NEXT: [[OUT_GEP:%.*]] = getelementptr inbounds i32, ptr [[OUT:%.*]], i64 999999
216
216
; OPT-GFX10-NEXT: [[CMP0:%.*]] = icmp eq i32 [[COND:%.*]], 0
217
217
; OPT-GFX10-NEXT: br i1 [[CMP0]], label [[ENDIF:%.*]], label [[IF:%.*]]
218
218
; OPT-GFX10: if:
219
219
; OPT-GFX10-NEXT: [[TMP0:%.*]] = addrspacecast ptr [[IN:%.*]] to ptr addrspace(1)
220
- ; OPT-GFX10-NEXT: [[SUNKADDR:%.*]] = getelementptr i8, ptr addrspace(1) [[TMP0]], i64 28
220
+ ; OPT-GFX10-NEXT: [[SUNKADDR:%.*]] = getelementptr inbounds i8, ptr addrspace(1) [[TMP0]], i64 28
221
221
; OPT-GFX10-NEXT: [[LOAD:%.*]] = load i32, ptr addrspace(1) [[SUNKADDR]], align 4
222
222
; OPT-GFX10-NEXT: br label [[ENDIF]]
223
223
; OPT-GFX10: endif:
@@ -303,8 +303,8 @@ define void @test_sink_noop_addrspacecast_flat_to_global_i32(ptr %out, ptr %in,
303
303
; GFX10-NEXT: s_waitcnt lgkmcnt(0)
304
304
; GFX10-NEXT: s_setpc_b64 s[30:31]
305
305
entry:
306
- %out.gep = getelementptr i32 , ptr %out , i64 999999
307
- %in.gep = getelementptr i32 , ptr %in , i64 7
306
+ %out.gep = getelementptr inbounds i32 , ptr %out , i64 999999
307
+ %in.gep = getelementptr inbounds i32 , ptr %in , i64 7
308
308
%cast = addrspacecast ptr %in.gep to ptr addrspace (1 )
309
309
%cmp0 = icmp eq i32 %cond , 0
310
310
br i1 %cmp0 , label %endif , label %if
@@ -325,12 +325,12 @@ done:
325
325
define void @test_sink_noop_addrspacecast_flat_to_constant_i32 (ptr %out , ptr %in , i32 %cond ) {
326
326
; OPT-LABEL: @test_sink_noop_addrspacecast_flat_to_constant_i32(
327
327
; OPT-NEXT: entry:
328
- ; OPT-NEXT: [[OUT_GEP:%.*]] = getelementptr i32, ptr [[OUT:%.*]], i64 999999
328
+ ; OPT-NEXT: [[OUT_GEP:%.*]] = getelementptr inbounds i32, ptr [[OUT:%.*]], i64 999999
329
329
; OPT-NEXT: [[CMP0:%.*]] = icmp eq i32 [[COND:%.*]], 0
330
330
; OPT-NEXT: br i1 [[CMP0]], label [[ENDIF:%.*]], label [[IF:%.*]]
331
331
; OPT: if:
332
332
; OPT-NEXT: [[TMP0:%.*]] = addrspacecast ptr [[IN:%.*]] to ptr addrspace(4)
333
- ; OPT-NEXT: [[SUNKADDR:%.*]] = getelementptr i8, ptr addrspace(4) [[TMP0]], i64 28
333
+ ; OPT-NEXT: [[SUNKADDR:%.*]] = getelementptr inbounds i8, ptr addrspace(4) [[TMP0]], i64 28
334
334
; OPT-NEXT: [[LOAD:%.*]] = load i32, ptr addrspace(4) [[SUNKADDR]], align 4
335
335
; OPT-NEXT: br label [[ENDIF]]
336
336
; OPT: endif:
@@ -416,8 +416,8 @@ define void @test_sink_noop_addrspacecast_flat_to_constant_i32(ptr %out, ptr %in
416
416
; GFX10-NEXT: s_waitcnt lgkmcnt(0)
417
417
; GFX10-NEXT: s_setpc_b64 s[30:31]
418
418
entry:
419
- %out.gep = getelementptr i32 , ptr %out , i64 999999
420
- %in.gep = getelementptr i32 , ptr %in , i64 7
419
+ %out.gep = getelementptr inbounds i32 , ptr %out , i64 999999
420
+ %in.gep = getelementptr inbounds i32 , ptr %in , i64 7
421
421
%cast = addrspacecast ptr %in.gep to ptr addrspace (4 )
422
422
%cmp0 = icmp eq i32 %cond , 0
423
423
br i1 %cmp0 , label %endif , label %if
@@ -438,8 +438,8 @@ done:
438
438
define void @test_sink_flat_small_max_flat_offset (ptr %out , ptr %in ) #1 {
439
439
; OPT-GFX7-LABEL: @test_sink_flat_small_max_flat_offset(
440
440
; OPT-GFX7-NEXT: entry:
441
- ; OPT-GFX7-NEXT: [[OUT_GEP:%.*]] = getelementptr i32, ptr [[OUT:%.*]], i32 1024
442
- ; OPT-GFX7-NEXT: [[IN_GEP:%.*]] = getelementptr i8, ptr [[IN:%.*]], i64 4095
441
+ ; OPT-GFX7-NEXT: [[OUT_GEP:%.*]] = getelementptr inbounds i32, ptr [[OUT:%.*]], i32 1024
442
+ ; OPT-GFX7-NEXT: [[IN_GEP:%.*]] = getelementptr inbounds i8, ptr [[IN:%.*]], i64 4095
443
443
; OPT-GFX7-NEXT: [[TID:%.*]] = call i32 @llvm.amdgcn.mbcnt.lo(i32 -1, i32 0) #[[ATTR3:[0-9]+]]
444
444
; OPT-GFX7-NEXT: [[CMP0:%.*]] = icmp eq i32 [[TID]], 0
445
445
; OPT-GFX7-NEXT: br i1 [[CMP0]], label [[ENDIF:%.*]], label [[IF:%.*]]
@@ -456,8 +456,8 @@ define void @test_sink_flat_small_max_flat_offset(ptr %out, ptr %in) #1 {
456
456
;
457
457
; OPT-GFX8-LABEL: @test_sink_flat_small_max_flat_offset(
458
458
; OPT-GFX8-NEXT: entry:
459
- ; OPT-GFX8-NEXT: [[OUT_GEP:%.*]] = getelementptr i32, ptr [[OUT:%.*]], i32 1024
460
- ; OPT-GFX8-NEXT: [[IN_GEP:%.*]] = getelementptr i8, ptr [[IN:%.*]], i64 4095
459
+ ; OPT-GFX8-NEXT: [[OUT_GEP:%.*]] = getelementptr inbounds i32, ptr [[OUT:%.*]], i32 1024
460
+ ; OPT-GFX8-NEXT: [[IN_GEP:%.*]] = getelementptr inbounds i8, ptr [[IN:%.*]], i64 4095
461
461
; OPT-GFX8-NEXT: [[TID:%.*]] = call i32 @llvm.amdgcn.mbcnt.lo(i32 -1, i32 0) #[[ATTR3:[0-9]+]]
462
462
; OPT-GFX8-NEXT: [[CMP0:%.*]] = icmp eq i32 [[TID]], 0
463
463
; OPT-GFX8-NEXT: br i1 [[CMP0]], label [[ENDIF:%.*]], label [[IF:%.*]]
@@ -474,12 +474,12 @@ define void @test_sink_flat_small_max_flat_offset(ptr %out, ptr %in) #1 {
474
474
;
475
475
; OPT-GFX9-LABEL: @test_sink_flat_small_max_flat_offset(
476
476
; OPT-GFX9-NEXT: entry:
477
- ; OPT-GFX9-NEXT: [[OUT_GEP:%.*]] = getelementptr i32, ptr [[OUT:%.*]], i32 1024
477
+ ; OPT-GFX9-NEXT: [[OUT_GEP:%.*]] = getelementptr inbounds i32, ptr [[OUT:%.*]], i32 1024
478
478
; OPT-GFX9-NEXT: [[TID:%.*]] = call i32 @llvm.amdgcn.mbcnt.lo(i32 -1, i32 0) #[[ATTR3:[0-9]+]]
479
479
; OPT-GFX9-NEXT: [[CMP0:%.*]] = icmp eq i32 [[TID]], 0
480
480
; OPT-GFX9-NEXT: br i1 [[CMP0]], label [[ENDIF:%.*]], label [[IF:%.*]]
481
481
; OPT-GFX9: if:
482
- ; OPT-GFX9-NEXT: [[SUNKADDR:%.*]] = getelementptr i8, ptr [[IN:%.*]], i64 4095
482
+ ; OPT-GFX9-NEXT: [[SUNKADDR:%.*]] = getelementptr inbounds i8, ptr [[IN:%.*]], i64 4095
483
483
; OPT-GFX9-NEXT: [[LOAD:%.*]] = load i8, ptr [[SUNKADDR]], align 1
484
484
; OPT-GFX9-NEXT: [[CAST:%.*]] = sext i8 [[LOAD]] to i32
485
485
; OPT-GFX9-NEXT: br label [[ENDIF]]
@@ -490,8 +490,8 @@ define void @test_sink_flat_small_max_flat_offset(ptr %out, ptr %in) #1 {
490
490
;
491
491
; OPT-GFX10-LABEL: @test_sink_flat_small_max_flat_offset(
492
492
; OPT-GFX10-NEXT: entry:
493
- ; OPT-GFX10-NEXT: [[OUT_GEP:%.*]] = getelementptr i32, ptr [[OUT:%.*]], i32 1024
494
- ; OPT-GFX10-NEXT: [[IN_GEP:%.*]] = getelementptr i8, ptr [[IN:%.*]], i64 4095
493
+ ; OPT-GFX10-NEXT: [[OUT_GEP:%.*]] = getelementptr inbounds i32, ptr [[OUT:%.*]], i32 1024
494
+ ; OPT-GFX10-NEXT: [[IN_GEP:%.*]] = getelementptr inbounds i8, ptr [[IN:%.*]], i64 4095
495
495
; OPT-GFX10-NEXT: [[TID:%.*]] = call i32 @llvm.amdgcn.mbcnt.lo(i32 -1, i32 0) #[[ATTR3:[0-9]+]]
496
496
; OPT-GFX10-NEXT: [[CMP0:%.*]] = icmp eq i32 [[TID]], 0
497
497
; OPT-GFX10-NEXT: br i1 [[CMP0]], label [[ENDIF:%.*]], label [[IF:%.*]]
@@ -588,8 +588,8 @@ define void @test_sink_flat_small_max_flat_offset(ptr %out, ptr %in) #1 {
588
588
; GFX10-NEXT: s_waitcnt lgkmcnt(0)
589
589
; GFX10-NEXT: s_setpc_b64 s[30:31]
590
590
entry:
591
- %out.gep = getelementptr i32 , ptr %out , i32 1024
592
- %in.gep = getelementptr i8 , ptr %in , i64 4095
591
+ %out.gep = getelementptr inbounds i32 , ptr %out , i32 1024
592
+ %in.gep = getelementptr inbounds i8 , ptr %in , i64 4095
593
593
%tid = call i32 @llvm.amdgcn.mbcnt.lo (i32 -1 , i32 0 ) #0
594
594
%cmp0 = icmp eq i32 %tid , 0
595
595
br i1 %cmp0 , label %endif , label %if
@@ -611,8 +611,8 @@ done:
611
611
define void @test_sink_flat_small_max_plus_1_flat_offset (ptr %out , ptr %in ) #1 {
612
612
; OPT-LABEL: @test_sink_flat_small_max_plus_1_flat_offset(
613
613
; OPT-NEXT: entry:
614
- ; OPT-NEXT: [[OUT_GEP:%.*]] = getelementptr i32, ptr [[OUT:%.*]], i64 99999
615
- ; OPT-NEXT: [[IN_GEP:%.*]] = getelementptr i8, ptr [[IN:%.*]], i64 4096
614
+ ; OPT-NEXT: [[OUT_GEP:%.*]] = getelementptr inbounds i32, ptr [[OUT:%.*]], i64 99999
615
+ ; OPT-NEXT: [[IN_GEP:%.*]] = getelementptr inbounds i8, ptr [[IN:%.*]], i64 4096
616
616
; OPT-NEXT: [[TID:%.*]] = call i32 @llvm.amdgcn.mbcnt.lo(i32 -1, i32 0) #[[ATTR3:[0-9]+]]
617
617
; OPT-NEXT: [[CMP0:%.*]] = icmp eq i32 [[TID]], 0
618
618
; OPT-NEXT: br i1 [[CMP0]], label [[ENDIF:%.*]], label [[IF:%.*]]
@@ -711,8 +711,8 @@ define void @test_sink_flat_small_max_plus_1_flat_offset(ptr %out, ptr %in) #1 {
711
711
; GFX10-NEXT: s_waitcnt lgkmcnt(0)
712
712
; GFX10-NEXT: s_setpc_b64 s[30:31]
713
713
entry:
714
- %out.gep = getelementptr i32 , ptr %out , i64 99999
715
- %in.gep = getelementptr i8 , ptr %in , i64 4096
714
+ %out.gep = getelementptr inbounds i32 , ptr %out , i64 99999
715
+ %in.gep = getelementptr inbounds i8 , ptr %in , i64 4096
716
716
%tid = call i32 @llvm.amdgcn.mbcnt.lo (i32 -1 , i32 0 ) #0
717
717
%cmp0 = icmp eq i32 %tid , 0
718
718
br i1 %cmp0 , label %endif , label %if
@@ -734,8 +734,8 @@ done:
734
734
define void @test_sinkable_flat_reg_offset (ptr %out , ptr %in , i64 %reg ) #1 {
735
735
; OPT-LABEL: @test_sinkable_flat_reg_offset(
736
736
; OPT-NEXT: entry:
737
- ; OPT-NEXT: [[OUT_GEP:%.*]] = getelementptr i32, ptr [[OUT:%.*]], i32 1024
738
- ; OPT-NEXT: [[IN_GEP:%.*]] = getelementptr i8, ptr [[IN:%.*]], i64 [[REG:%.*]]
737
+ ; OPT-NEXT: [[OUT_GEP:%.*]] = getelementptr inbounds i32, ptr [[OUT:%.*]], i32 1024
738
+ ; OPT-NEXT: [[IN_GEP:%.*]] = getelementptr inbounds i8, ptr [[IN:%.*]], i64 [[REG:%.*]]
739
739
; OPT-NEXT: [[TID:%.*]] = call i32 @llvm.amdgcn.mbcnt.lo(i32 -1, i32 0) #[[ATTR3]]
740
740
; OPT-NEXT: [[CMP0:%.*]] = icmp eq i32 [[TID]], 0
741
741
; OPT-NEXT: br i1 [[CMP0]], label [[ENDIF:%.*]], label [[IF:%.*]]
@@ -834,8 +834,8 @@ define void @test_sinkable_flat_reg_offset(ptr %out, ptr %in, i64 %reg) #1 {
834
834
; GFX10-NEXT: s_waitcnt lgkmcnt(0)
835
835
; GFX10-NEXT: s_setpc_b64 s[30:31]
836
836
entry:
837
- %out.gep = getelementptr i32 , ptr %out , i32 1024
838
- %in.gep = getelementptr i8 , ptr %in , i64 %reg
837
+ %out.gep = getelementptr inbounds i32 , ptr %out , i32 1024
838
+ %in.gep = getelementptr inbounds i8 , ptr %in , i64 %reg
839
839
%tid = call i32 @llvm.amdgcn.mbcnt.lo (i32 -1 , i32 0 ) #0
840
840
%cmp0 = icmp eq i32 %tid , 0
841
841
br i1 %cmp0 , label %endif , label %if
0 commit comments