Lines Matching refs:IR
2 ; RUN: opt -S -mtriple=amdgcn-- -mcpu=tahiti -atomic-expand < %s | FileCheck -check-prefix=IR %s
6 ; IR-LABEL: @load_atomic_private_seq_cst_i32(
7 ; IR-NEXT: [[LOAD:%.*]] = load i32, i32 addrspace(5)* [[PTR:%.*]], align 4
8 ; IR-NEXT: ret i32 [[LOAD]]
21 ; IR-LABEL: @load_atomic_private_seq_cst_i64(
22 ; IR-NEXT: [[LOAD:%.*]] = load i64, i64 addrspace(5)* [[PTR:%.*]], align 8
23 ; IR-NEXT: ret i64 [[LOAD]]
38 ; IR-LABEL: @atomic_store_seq_cst_i32(
39 ; IR-NEXT: store i32 [[VAL:%.*]], i32 addrspace(5)* [[PTR:%.*]], align 4
40 ; IR-NEXT: ret void
53 ; IR-LABEL: @atomic_store_seq_cst_i64(
54 ; IR-NEXT: store i64 [[VAL:%.*]], i64 addrspace(5)* [[PTR:%.*]], align 8
55 ; IR-NEXT: ret void
70 ; IR-LABEL: @load_atomic_private_seq_cst_syncscope_i32(
71 ; IR-NEXT: [[LOAD:%.*]] = load i32, i32 addrspace(5)* [[PTR:%.*]], align 4
72 ; IR-NEXT: ret i32 [[LOAD]]
85 ; IR-LABEL: @atomic_store_seq_cst_syncscope_i32(
86 ; IR-NEXT: store i32 [[VAL:%.*]], i32 addrspace(5)* [[PTR:%.*]], align 4
87 ; IR-NEXT: ret void
100 ; IR-LABEL: @cmpxchg_private_i32(
101 ; IR-NEXT: [[TMP1:%.*]] = load i32, i32 addrspace(5)* [[PTR:%.*]], align 4
102 ; IR-NEXT: [[TMP2:%.*]] = icmp eq i32 [[TMP1]], 0
103 ; IR-NEXT: [[TMP3:%.*]] = select i1 [[TMP2]], i32 1, i32 [[TMP1]]
104 ; IR-NEXT: store i32 [[TMP3]], i32 addrspace(5)* [[PTR]], align 4
105 ; IR-NEXT: [[TMP4:%.*]] = insertvalue { i32, i1 } poison, i32 [[TMP1]], 0
106 ; IR-NEXT: [[TMP5:%.*]] = insertvalue { i32, i1 } [[TMP4]], i1 [[TMP2]], 1
107 ; IR-NEXT: [[RESULT_0:%.*]] = extractvalue { i32, i1 } [[TMP5]], 0
108 ; IR-NEXT: [[RESULT_1:%.*]] = extractvalue { i32, i1 } [[TMP5]], 1
109 ; IR-NEXT: store i1 [[RESULT_1]], i1 addrspace(1)* poison, align 1
110 ; IR-NEXT: ret i32 [[RESULT_0]]
136 ; IR-LABEL: @cmpxchg_private_i64(
137 ; IR-NEXT: [[TMP1:%.*]] = load i64, i64 addrspace(5)* [[PTR:%.*]], align 4
138 ; IR-NEXT: [[TMP2:%.*]] = icmp eq i64 [[TMP1]], 0
139 ; IR-NEXT: [[TMP3:%.*]] = select i1 [[TMP2]], i64 1, i64 [[TMP1]]
140 ; IR-NEXT: store i64 [[TMP3]], i64 addrspace(5)* [[PTR]], align 4
141 ; IR-NEXT: [[TMP4:%.*]] = insertvalue { i64, i1 } poison, i64 [[TMP1]], 0
142 ; IR-NEXT: [[TMP5:%.*]] = insertvalue { i64, i1 } [[TMP4]], i1 [[TMP2]], 1
143 ; IR-NEXT: [[RESULT_0:%.*]] = extractvalue { i64, i1 } [[TMP5]], 0
144 ; IR-NEXT: [[RESULT_1:%.*]] = extractvalue { i64, i1 } [[TMP5]], 1
145 ; IR-NEXT: store i1 [[RESULT_1]], i1 addrspace(1)* poison, align 1
146 ; IR-NEXT: ret i64 [[RESULT_0]]
177 ; IR-LABEL: @atomicrmw_xchg_private_i32(
178 ; IR-NEXT: [[TMP1:%.*]] = load i32, i32 addrspace(5)* [[PTR:%.*]], align 4
179 ; IR-NEXT: store i32 4, i32 addrspace(5)* [[PTR]], align 4
180 ; IR-NEXT: ret i32 [[TMP1]]
197 ; IR-LABEL: @atomicrmw_add_private_i32(
198 ; IR-NEXT: [[TMP1:%.*]] = load i32, i32 addrspace(5)* [[PTR:%.*]], align 4
199 ; IR-NEXT: [[NEW:%.*]] = add i32 [[TMP1]], 4
200 ; IR-NEXT: store i32 [[NEW]], i32 addrspace(5)* [[PTR]], align 4
201 ; IR-NEXT: ret i32 [[TMP1]]
218 ; IR-LABEL: @atomicrmw_sub_private_i32(
219 ; IR-NEXT: [[TMP1:%.*]] = load i32, i32 addrspace(5)* [[PTR:%.*]], align 4
220 ; IR-NEXT: [[NEW:%.*]] = sub i32 [[TMP1]], 4
221 ; IR-NEXT: store i32 [[NEW]], i32 addrspace(5)* [[PTR]], align 4
222 ; IR-NEXT: ret i32 [[TMP1]]
239 ; IR-LABEL: @atomicrmw_and_private_i32(
240 ; IR-NEXT: [[TMP1:%.*]] = load i32, i32 addrspace(5)* [[PTR:%.*]], align 4
241 ; IR-NEXT: [[NEW:%.*]] = and i32 [[TMP1]], 4
242 ; IR-NEXT: store i32 [[NEW]], i32 addrspace(5)* [[PTR]], align 4
243 ; IR-NEXT: ret i32 [[TMP1]]
260 ; IR-LABEL: @atomicrmw_nand_private_i32(
261 ; IR-NEXT: [[TMP1:%.*]] = load i32, i32 addrspace(5)* [[PTR:%.*]], align 4
262 ; IR-NEXT: [[TMP2:%.*]] = and i32 [[TMP1]], 4
263 ; IR-NEXT: [[NEW:%.*]] = xor i32 [[TMP2]], -1
264 ; IR-NEXT: store i32 [[NEW]], i32 addrspace(5)* [[PTR]], align 4
265 ; IR-NEXT: ret i32 [[TMP1]]
283 ; IR-LABEL: @atomicrmw_or_private_i32(
284 ; IR-NEXT: [[TMP1:%.*]] = load i32, i32 addrspace(5)* [[PTR:%.*]], align 4
285 ; IR-NEXT: [[NEW:%.*]] = or i32 [[TMP1]], 4
286 ; IR-NEXT: store i32 [[NEW]], i32 addrspace(5)* [[PTR]], align 4
287 ; IR-NEXT: ret i32 [[TMP1]]
304 ; IR-LABEL: @atomicrmw_xor_private_i32(
305 ; IR-NEXT: [[TMP1:%.*]] = load i32, i32 addrspace(5)* [[PTR:%.*]], align 4
306 ; IR-NEXT: [[NEW:%.*]] = xor i32 [[TMP1]], 4
307 ; IR-NEXT: store i32 [[NEW]], i32 addrspace(5)* [[PTR]], align 4
308 ; IR-NEXT: ret i32 [[TMP1]]
325 ; IR-LABEL: @atomicrmw_max_private_i32(
326 ; IR-NEXT: [[TMP1:%.*]] = load i32, i32 addrspace(5)* [[PTR:%.*]], align 4
327 ; IR-NEXT: [[TMP2:%.*]] = icmp sgt i32 [[TMP1]], 4
328 ; IR-NEXT: [[NEW:%.*]] = select i1 [[TMP2]], i32 [[TMP1]], i32 4
329 ; IR-NEXT: store i32 [[NEW]], i32 addrspace(5)* [[PTR]], align 4
330 ; IR-NEXT: ret i32 [[TMP1]]
347 ; IR-LABEL: @atomicrmw_min_private_i32(
348 ; IR-NEXT: [[TMP1:%.*]] = load i32, i32 addrspace(5)* [[PTR:%.*]], align 4
349 ; IR-NEXT: [[TMP2:%.*]] = icmp sle i32 [[TMP1]], 4
350 ; IR-NEXT: [[NEW:%.*]] = select i1 [[TMP2]], i32 [[TMP1]], i32 4
351 ; IR-NEXT: store i32 [[NEW]], i32 addrspace(5)* [[PTR]], align 4
352 ; IR-NEXT: ret i32 [[TMP1]]
369 ; IR-LABEL: @atomicrmw_umax_private_i32(
370 ; IR-NEXT: [[TMP1:%.*]] = load i32, i32 addrspace(5)* [[PTR:%.*]], align 4
371 ; IR-NEXT: [[TMP2:%.*]] = icmp ugt i32 [[TMP1]], 4
372 ; IR-NEXT: [[NEW:%.*]] = select i1 [[TMP2]], i32 [[TMP1]], i32 4
373 ; IR-NEXT: store i32 [[NEW]], i32 addrspace(5)* [[PTR]], align 4
374 ; IR-NEXT: ret i32 [[TMP1]]
391 ; IR-LABEL: @atomicrmw_umin_private_i32(
392 ; IR-NEXT: [[TMP1:%.*]] = load i32, i32 addrspace(5)* [[PTR:%.*]], align 4
393 ; IR-NEXT: [[TMP2:%.*]] = icmp ule i32 [[TMP1]], 4
394 ; IR-NEXT: [[NEW:%.*]] = select i1 [[TMP2]], i32 [[TMP1]], i32 4
395 ; IR-NEXT: store i32 [[NEW]], i32 addrspace(5)* [[PTR]], align 4
396 ; IR-NEXT: ret i32 [[TMP1]]
413 ; IR-LABEL: @atomicrmw_fadd_private_i32(
414 ; IR-NEXT: [[TMP1:%.*]] = load float, float addrspace(5)* [[PTR:%.*]], align 4
415 ; IR-NEXT: [[NEW:%.*]] = fadd float [[TMP1]], 2.000000e+00
416 ; IR-NEXT: store float [[NEW]], float addrspace(5)* [[PTR]], align 4
417 ; IR-NEXT: ret float [[TMP1]]
434 ; IR-LABEL: @atomicrmw_fsub_private_i32(
435 ; IR-NEXT: [[TMP1:%.*]] = load float, float addrspace(5)* [[PTR:%.*]], align 4
436 ; IR-NEXT: [[NEW:%.*]] = fsub float [[TMP1]], [[VAL:%.*]]
437 ; IR-NEXT: store float [[NEW]], float addrspace(5)* [[PTR]], align 4
438 ; IR-NEXT: ret float [[TMP1]]
455 ; IR-LABEL: @alloca_promote_atomicrmw_private_lds_promote(
456 ; IR-NEXT: entry:
457 ; IR-NEXT: [[TMP:%.*]] = alloca [2 x i32], align 4, addrspace(5)
458 ; IR-NEXT: [[GEP1:%.*]] = getelementptr inbounds [2 x i32], [2 x i32] addrspace(5)* [[TMP]], i32…
459 ; IR-NEXT: [[GEP2:%.*]] = getelementptr inbounds [2 x i32], [2 x i32] addrspace(5)* [[TMP]], i32…
460 ; IR-NEXT: store i32 0, i32 addrspace(5)* [[GEP1]], align 4
461 ; IR-NEXT: store i32 1, i32 addrspace(5)* [[GEP2]], align 4
462 ; IR-NEXT: [[GEP3:%.*]] = getelementptr inbounds [2 x i32], [2 x i32] addrspace(5)* [[TMP]], i32…
463 ; IR-NEXT: [[TMP0:%.*]] = load i32, i32 addrspace(5)* [[GEP3]], align 4
464 ; IR-NEXT: [[NEW:%.*]] = add i32 [[TMP0]], 7
465 ; IR-NEXT: store i32 [[NEW]], i32 addrspace(5)* [[GEP3]], align 4
466 ; IR-NEXT: store i32 [[TMP0]], i32 addrspace(1)* [[OUT:%.*]], align 4
467 ; IR-NEXT: ret void
494 ; IR-LABEL: @alloca_promote_cmpxchg_private(
495 ; IR-NEXT: entry:
496 ; IR-NEXT: [[TMP:%.*]] = alloca [2 x i32], align 4, addrspace(5)
497 ; IR-NEXT: [[GEP1:%.*]] = getelementptr inbounds [2 x i32], [2 x i32] addrspace(5)* [[TMP]], i32…
498 ; IR-NEXT: [[GEP2:%.*]] = getelementptr inbounds [2 x i32], [2 x i32] addrspace(5)* [[TMP]], i32…
499 ; IR-NEXT: store i32 0, i32 addrspace(5)* [[GEP1]], align 4
500 ; IR-NEXT: store i32 1, i32 addrspace(5)* [[GEP2]], align 4
501 ; IR-NEXT: [[GEP3:%.*]] = getelementptr inbounds [2 x i32], [2 x i32] addrspace(5)* [[TMP]], i32…
502 ; IR-NEXT: [[TMP0:%.*]] = load i32, i32 addrspace(5)* [[GEP3]], align 4
503 ; IR-NEXT: [[TMP1:%.*]] = icmp eq i32 [[TMP0]], 0
504 ; IR-NEXT: [[TMP2:%.*]] = select i1 [[TMP1]], i32 1, i32 [[TMP0]]
505 ; IR-NEXT: store i32 [[TMP2]], i32 addrspace(5)* [[GEP3]], align 4
506 ; IR-NEXT: [[TMP3:%.*]] = insertvalue { i32, i1 } poison, i32 [[TMP0]], 0
507 ; IR-NEXT: [[TMP4:%.*]] = insertvalue { i32, i1 } [[TMP3]], i1 [[TMP1]], 1
508 ; IR-NEXT: [[VAL:%.*]] = extractvalue { i32, i1 } [[TMP4]], 0
509 ; IR-NEXT: store i32 [[VAL]], i32 addrspace(1)* [[OUT:%.*]], align 4
510 ; IR-NEXT: ret void