1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=amdgcn -mcpu=gfx90a -amdgpu-atomic-optimizer-strategy=None < %s | FileCheck %s
4 define protected amdgpu_kernel void @IllegalGEPConst(i32 %a, ptr addrspace(1) %b, double %c) {
5 ; CHECK-LABEL: IllegalGEPConst:
6 ; CHECK: ; %bb.0: ; %entry
7 ; CHECK-NEXT: s_load_dword s6, s[4:5], 0x24
8 ; CHECK-NEXT: s_load_dwordx4 s[0:3], s[4:5], 0x2c
9 ; CHECK-NEXT: v_mov_b32_e32 v2, 0
10 ; CHECK-NEXT: s_waitcnt lgkmcnt(0)
11 ; CHECK-NEXT: s_ashr_i32 s7, s6, 31
12 ; CHECK-NEXT: v_mov_b32_e32 v0, s2
13 ; CHECK-NEXT: v_mov_b32_e32 v1, s3
14 ; CHECK-NEXT: s_lshl_b64 s[2:3], s[6:7], 3
15 ; CHECK-NEXT: s_add_u32 s0, s0, s2
16 ; CHECK-NEXT: s_addc_u32 s1, s1, s3
17 ; CHECK-NEXT: global_atomic_add_f64 v2, v[0:1], s[0:1] offset:-8
18 ; CHECK-NEXT: s_waitcnt vmcnt(0)
19 ; CHECK-NEXT: buffer_wbinvl1_vol
20 ; CHECK-NEXT: s_endpgm
22 %i = add nsw i32 %a, -1
23 %i.2 = sext i32 %i to i64
24 %i.3 = getelementptr inbounds double, ptr addrspace(1) %b, i64 %i.2
25 %i.4 = addrspacecast ptr addrspace(1) %i.3 to ptr
26 %i.5 = atomicrmw fadd ptr %i.4, double %c syncscope("agent") seq_cst, align 8, !amdgpu.no.fine.grained.memory !0