Skip to content

AMDGPU: Add baseline tests for gep flag handling #110814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

arsenm
Copy link
Contributor

@arsenm arsenm commented Oct 2, 2024

We need to know the address computation won't overflow on
older subtargets to match the addressing mode of stack instructions.

Copy link
Contributor Author

arsenm commented Oct 2, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @arsenm and the rest of your teammates on Graphite Graphite

@llvmbot
Copy link
Member

llvmbot commented Oct 2, 2024

@llvm/pr-subscribers-backend-amdgpu

Author: Matt Arsenault (arsenm)

Changes

We need to know the address computation won't overflow on
older subtargets to match the addressing mode of stack instructions.


Full diff: https://github.com/llvm/llvm-project/pull/110814.diff

1 Files Affected:

  • (added) llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll (+197)
diff --git a/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll b/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
new file mode 100644
index 00000000000000..782894976c711c
--- /dev/null
+++ b/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
@@ -0,0 +1,197 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; gfx8 required knowing no overflow happened to fold the addressing mode
+; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 < %s | FileCheck -check-prefix=GFX8 %s
+; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 < %s | FileCheck -check-prefix=GFX9 %s
+
+define void @gep_noflags_alloca(i32 %idx, i32 %val) #0 {
+; GFX8-LABEL: gep_noflags_alloca:
+; GFX8:       ; %bb.0:
+; GFX8-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-NEXT:    v_lshlrev_b32_e32 v0, 2, v0
+; GFX8-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, v2, v0
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, 16, v0
+; GFX8-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen
+; GFX8-NEXT:    s_waitcnt vmcnt(0)
+; GFX8-NEXT:    s_setpc_b64 s[30:31]
+;
+; GFX9-LABEL: gep_noflags_alloca:
+; GFX9:       ; %bb.0:
+; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX9-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX9-NEXT:    v_lshl_add_u32 v0, v0, 2, v2
+; GFX9-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen offset:16
+; GFX9-NEXT:    s_waitcnt vmcnt(0)
+; GFX9-NEXT:    s_setpc_b64 s[30:31]
+  %alloca = alloca [32 x i32], addrspace(5)
+  %gep0 = getelementptr [32 x i32], ptr addrspace(5) %alloca, i32 0, i32 %idx
+  %gep1 = getelementptr i32, ptr addrspace(5) %gep0, i32 4
+  store volatile i32 %val, ptr addrspace(5) %gep1
+  ret void
+}
+
+define void @gep_inbounds_alloca(i32 %idx, i32 %val) #0 {
+; GFX8-LABEL: gep_inbounds_alloca:
+; GFX8:       ; %bb.0:
+; GFX8-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-NEXT:    v_lshlrev_b32_e32 v0, 2, v0
+; GFX8-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, v2, v0
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, 16, v0
+; GFX8-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen
+; GFX8-NEXT:    s_waitcnt vmcnt(0)
+; GFX8-NEXT:    s_setpc_b64 s[30:31]
+;
+; GFX9-LABEL: gep_inbounds_alloca:
+; GFX9:       ; %bb.0:
+; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX9-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX9-NEXT:    v_lshl_add_u32 v0, v0, 2, v2
+; GFX9-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen offset:16
+; GFX9-NEXT:    s_waitcnt vmcnt(0)
+; GFX9-NEXT:    s_setpc_b64 s[30:31]
+  %alloca = alloca [32 x i32], addrspace(5)
+  %gep0 = getelementptr inbounds [32 x i32], ptr addrspace(5) %alloca, i32 0, i32 %idx
+  %gep1 = getelementptr i32, ptr addrspace(5) %gep0, i32 4
+  store volatile i32 %val, ptr addrspace(5) %gep1
+  ret void
+}
+
+define void @gep_nuw_alloca(i32 %idx, i32 %val) #0 {
+; GFX8-LABEL: gep_nuw_alloca:
+; GFX8:       ; %bb.0:
+; GFX8-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-NEXT:    v_lshlrev_b32_e32 v0, 2, v0
+; GFX8-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, v2, v0
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, 16, v0
+; GFX8-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen
+; GFX8-NEXT:    s_waitcnt vmcnt(0)
+; GFX8-NEXT:    s_setpc_b64 s[30:31]
+;
+; GFX9-LABEL: gep_nuw_alloca:
+; GFX9:       ; %bb.0:
+; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX9-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX9-NEXT:    v_lshl_add_u32 v0, v0, 2, v2
+; GFX9-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen offset:16
+; GFX9-NEXT:    s_waitcnt vmcnt(0)
+; GFX9-NEXT:    s_setpc_b64 s[30:31]
+  %alloca = alloca [32 x i32], addrspace(5)
+  %gep0 = getelementptr nuw [32 x i32], ptr addrspace(5) %alloca, i32 0, i32 %idx
+  %gep1 = getelementptr i32, ptr addrspace(5) %gep0, i32 4
+  store volatile i32 %val, ptr addrspace(5) %gep1
+  ret void
+}
+
+define void @gep_nusw_alloca(i32 %idx, i32 %val) #0 {
+; GFX8-LABEL: gep_nusw_alloca:
+; GFX8:       ; %bb.0:
+; GFX8-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-NEXT:    v_lshlrev_b32_e32 v0, 2, v0
+; GFX8-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, v2, v0
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, 16, v0
+; GFX8-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen
+; GFX8-NEXT:    s_waitcnt vmcnt(0)
+; GFX8-NEXT:    s_setpc_b64 s[30:31]
+;
+; GFX9-LABEL: gep_nusw_alloca:
+; GFX9:       ; %bb.0:
+; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX9-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX9-NEXT:    v_lshl_add_u32 v0, v0, 2, v2
+; GFX9-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen offset:16
+; GFX9-NEXT:    s_waitcnt vmcnt(0)
+; GFX9-NEXT:    s_setpc_b64 s[30:31]
+  %alloca = alloca [32 x i32], addrspace(5)
+  %gep0 = getelementptr nusw [32 x i32], ptr addrspace(5) %alloca, i32 0, i32 %idx
+  %gep1 = getelementptr i32, ptr addrspace(5) %gep0, i32 4
+  store volatile i32 %val, ptr addrspace(5) %gep1
+  ret void
+}
+
+define void @gep_inbounds_nuw_alloca(i32 %idx, i32 %val) #0 {
+; GFX8-LABEL: gep_inbounds_nuw_alloca:
+; GFX8:       ; %bb.0:
+; GFX8-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-NEXT:    v_lshlrev_b32_e32 v0, 2, v0
+; GFX8-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, v2, v0
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, 16, v0
+; GFX8-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen
+; GFX8-NEXT:    s_waitcnt vmcnt(0)
+; GFX8-NEXT:    s_setpc_b64 s[30:31]
+;
+; GFX9-LABEL: gep_inbounds_nuw_alloca:
+; GFX9:       ; %bb.0:
+; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX9-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX9-NEXT:    v_lshl_add_u32 v0, v0, 2, v2
+; GFX9-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen offset:16
+; GFX9-NEXT:    s_waitcnt vmcnt(0)
+; GFX9-NEXT:    s_setpc_b64 s[30:31]
+  %alloca = alloca [32 x i32], addrspace(5)
+  %gep0 = getelementptr inbounds nuw [32 x i32], ptr addrspace(5) %alloca, i32 0, i32 %idx
+  %gep1 = getelementptr i32, ptr addrspace(5) %gep0, i32 4
+  store volatile i32 %val, ptr addrspace(5) %gep1
+  ret void
+}
+
+define void @gep_nusw_nuw_alloca(i32 %idx, i32 %val) #0 {
+; GFX8-LABEL: gep_nusw_nuw_alloca:
+; GFX8:       ; %bb.0:
+; GFX8-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-NEXT:    v_lshlrev_b32_e32 v0, 2, v0
+; GFX8-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, v2, v0
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, 16, v0
+; GFX8-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen
+; GFX8-NEXT:    s_waitcnt vmcnt(0)
+; GFX8-NEXT:    s_setpc_b64 s[30:31]
+;
+; GFX9-LABEL: gep_nusw_nuw_alloca:
+; GFX9:       ; %bb.0:
+; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX9-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX9-NEXT:    v_lshl_add_u32 v0, v0, 2, v2
+; GFX9-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen offset:16
+; GFX9-NEXT:    s_waitcnt vmcnt(0)
+; GFX9-NEXT:    s_setpc_b64 s[30:31]
+  %alloca = alloca [32 x i32], addrspace(5)
+  %gep0 = getelementptr nusw nuw [32 x i32], ptr addrspace(5) %alloca, i32 0, i32 %idx
+  %gep1 = getelementptr i32, ptr addrspace(5) %gep0, i32 4
+  store volatile i32 %val, ptr addrspace(5) %gep1
+  ret void
+}
+
+define void @gep_inbounds_nuw_alloca_nonpow2_scale(i32 %idx, i32 %val) #0 {
+; GFX8-LABEL: gep_inbounds_nuw_alloca_nonpow2_scale:
+; GFX8:       ; %bb.0:
+; GFX8-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-NEXT:    s_movk_i32 s4, 0x84
+; GFX8-NEXT:    v_mul_lo_u32 v0, v0, s4
+; GFX8-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, v2, v0
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, 16, v0
+; GFX8-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen
+; GFX8-NEXT:    s_waitcnt vmcnt(0)
+; GFX8-NEXT:    s_setpc_b64 s[30:31]
+;
+; GFX9-LABEL: gep_inbounds_nuw_alloca_nonpow2_scale:
+; GFX9:       ; %bb.0:
+; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX9-NEXT:    s_movk_i32 s4, 0x84
+; GFX9-NEXT:    v_mul_lo_u32 v0, v0, s4
+; GFX9-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX9-NEXT:    v_add_u32_e32 v0, v2, v0
+; GFX9-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen offset:16
+; GFX9-NEXT:    s_waitcnt vmcnt(0)
+; GFX9-NEXT:    s_setpc_b64 s[30:31]
+  %alloca = alloca [5 x [33 x i32]], align 4, addrspace(5)
+  %gep1 = getelementptr inbounds nuw [5 x [33 x i32]], ptr addrspace(5) %alloca, i32 0, i32 %idx, i32 4
+  store volatile i32 %val, ptr addrspace(5) %gep1, align 4
+  ret void
+}
+
+attributes #0 = { nounwind }

@llvmbot
Copy link
Member

llvmbot commented Oct 2, 2024

@llvm/pr-subscribers-llvm-selectiondag

Author: Matt Arsenault (arsenm)

Changes

We need to know the address computation won't overflow on
older subtargets to match the addressing mode of stack instructions.


Full diff: https://github.com/llvm/llvm-project/pull/110814.diff

1 Files Affected:

  • (added) llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll (+197)
diff --git a/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll b/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
new file mode 100644
index 00000000000000..782894976c711c
--- /dev/null
+++ b/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
@@ -0,0 +1,197 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; gfx8 required knowing no overflow happened to fold the addressing mode
+; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 < %s | FileCheck -check-prefix=GFX8 %s
+; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 < %s | FileCheck -check-prefix=GFX9 %s
+
+define void @gep_noflags_alloca(i32 %idx, i32 %val) #0 {
+; GFX8-LABEL: gep_noflags_alloca:
+; GFX8:       ; %bb.0:
+; GFX8-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-NEXT:    v_lshlrev_b32_e32 v0, 2, v0
+; GFX8-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, v2, v0
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, 16, v0
+; GFX8-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen
+; GFX8-NEXT:    s_waitcnt vmcnt(0)
+; GFX8-NEXT:    s_setpc_b64 s[30:31]
+;
+; GFX9-LABEL: gep_noflags_alloca:
+; GFX9:       ; %bb.0:
+; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX9-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX9-NEXT:    v_lshl_add_u32 v0, v0, 2, v2
+; GFX9-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen offset:16
+; GFX9-NEXT:    s_waitcnt vmcnt(0)
+; GFX9-NEXT:    s_setpc_b64 s[30:31]
+  %alloca = alloca [32 x i32], addrspace(5)
+  %gep0 = getelementptr [32 x i32], ptr addrspace(5) %alloca, i32 0, i32 %idx
+  %gep1 = getelementptr i32, ptr addrspace(5) %gep0, i32 4
+  store volatile i32 %val, ptr addrspace(5) %gep1
+  ret void
+}
+
+define void @gep_inbounds_alloca(i32 %idx, i32 %val) #0 {
+; GFX8-LABEL: gep_inbounds_alloca:
+; GFX8:       ; %bb.0:
+; GFX8-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-NEXT:    v_lshlrev_b32_e32 v0, 2, v0
+; GFX8-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, v2, v0
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, 16, v0
+; GFX8-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen
+; GFX8-NEXT:    s_waitcnt vmcnt(0)
+; GFX8-NEXT:    s_setpc_b64 s[30:31]
+;
+; GFX9-LABEL: gep_inbounds_alloca:
+; GFX9:       ; %bb.0:
+; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX9-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX9-NEXT:    v_lshl_add_u32 v0, v0, 2, v2
+; GFX9-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen offset:16
+; GFX9-NEXT:    s_waitcnt vmcnt(0)
+; GFX9-NEXT:    s_setpc_b64 s[30:31]
+  %alloca = alloca [32 x i32], addrspace(5)
+  %gep0 = getelementptr inbounds [32 x i32], ptr addrspace(5) %alloca, i32 0, i32 %idx
+  %gep1 = getelementptr i32, ptr addrspace(5) %gep0, i32 4
+  store volatile i32 %val, ptr addrspace(5) %gep1
+  ret void
+}
+
+define void @gep_nuw_alloca(i32 %idx, i32 %val) #0 {
+; GFX8-LABEL: gep_nuw_alloca:
+; GFX8:       ; %bb.0:
+; GFX8-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-NEXT:    v_lshlrev_b32_e32 v0, 2, v0
+; GFX8-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, v2, v0
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, 16, v0
+; GFX8-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen
+; GFX8-NEXT:    s_waitcnt vmcnt(0)
+; GFX8-NEXT:    s_setpc_b64 s[30:31]
+;
+; GFX9-LABEL: gep_nuw_alloca:
+; GFX9:       ; %bb.0:
+; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX9-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX9-NEXT:    v_lshl_add_u32 v0, v0, 2, v2
+; GFX9-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen offset:16
+; GFX9-NEXT:    s_waitcnt vmcnt(0)
+; GFX9-NEXT:    s_setpc_b64 s[30:31]
+  %alloca = alloca [32 x i32], addrspace(5)
+  %gep0 = getelementptr nuw [32 x i32], ptr addrspace(5) %alloca, i32 0, i32 %idx
+  %gep1 = getelementptr i32, ptr addrspace(5) %gep0, i32 4
+  store volatile i32 %val, ptr addrspace(5) %gep1
+  ret void
+}
+
+define void @gep_nusw_alloca(i32 %idx, i32 %val) #0 {
+; GFX8-LABEL: gep_nusw_alloca:
+; GFX8:       ; %bb.0:
+; GFX8-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-NEXT:    v_lshlrev_b32_e32 v0, 2, v0
+; GFX8-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, v2, v0
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, 16, v0
+; GFX8-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen
+; GFX8-NEXT:    s_waitcnt vmcnt(0)
+; GFX8-NEXT:    s_setpc_b64 s[30:31]
+;
+; GFX9-LABEL: gep_nusw_alloca:
+; GFX9:       ; %bb.0:
+; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX9-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX9-NEXT:    v_lshl_add_u32 v0, v0, 2, v2
+; GFX9-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen offset:16
+; GFX9-NEXT:    s_waitcnt vmcnt(0)
+; GFX9-NEXT:    s_setpc_b64 s[30:31]
+  %alloca = alloca [32 x i32], addrspace(5)
+  %gep0 = getelementptr nusw [32 x i32], ptr addrspace(5) %alloca, i32 0, i32 %idx
+  %gep1 = getelementptr i32, ptr addrspace(5) %gep0, i32 4
+  store volatile i32 %val, ptr addrspace(5) %gep1
+  ret void
+}
+
+define void @gep_inbounds_nuw_alloca(i32 %idx, i32 %val) #0 {
+; GFX8-LABEL: gep_inbounds_nuw_alloca:
+; GFX8:       ; %bb.0:
+; GFX8-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-NEXT:    v_lshlrev_b32_e32 v0, 2, v0
+; GFX8-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, v2, v0
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, 16, v0
+; GFX8-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen
+; GFX8-NEXT:    s_waitcnt vmcnt(0)
+; GFX8-NEXT:    s_setpc_b64 s[30:31]
+;
+; GFX9-LABEL: gep_inbounds_nuw_alloca:
+; GFX9:       ; %bb.0:
+; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX9-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX9-NEXT:    v_lshl_add_u32 v0, v0, 2, v2
+; GFX9-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen offset:16
+; GFX9-NEXT:    s_waitcnt vmcnt(0)
+; GFX9-NEXT:    s_setpc_b64 s[30:31]
+  %alloca = alloca [32 x i32], addrspace(5)
+  %gep0 = getelementptr inbounds nuw [32 x i32], ptr addrspace(5) %alloca, i32 0, i32 %idx
+  %gep1 = getelementptr i32, ptr addrspace(5) %gep0, i32 4
+  store volatile i32 %val, ptr addrspace(5) %gep1
+  ret void
+}
+
+define void @gep_nusw_nuw_alloca(i32 %idx, i32 %val) #0 {
+; GFX8-LABEL: gep_nusw_nuw_alloca:
+; GFX8:       ; %bb.0:
+; GFX8-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-NEXT:    v_lshlrev_b32_e32 v0, 2, v0
+; GFX8-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, v2, v0
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, 16, v0
+; GFX8-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen
+; GFX8-NEXT:    s_waitcnt vmcnt(0)
+; GFX8-NEXT:    s_setpc_b64 s[30:31]
+;
+; GFX9-LABEL: gep_nusw_nuw_alloca:
+; GFX9:       ; %bb.0:
+; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX9-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX9-NEXT:    v_lshl_add_u32 v0, v0, 2, v2
+; GFX9-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen offset:16
+; GFX9-NEXT:    s_waitcnt vmcnt(0)
+; GFX9-NEXT:    s_setpc_b64 s[30:31]
+  %alloca = alloca [32 x i32], addrspace(5)
+  %gep0 = getelementptr nusw nuw [32 x i32], ptr addrspace(5) %alloca, i32 0, i32 %idx
+  %gep1 = getelementptr i32, ptr addrspace(5) %gep0, i32 4
+  store volatile i32 %val, ptr addrspace(5) %gep1
+  ret void
+}
+
+define void @gep_inbounds_nuw_alloca_nonpow2_scale(i32 %idx, i32 %val) #0 {
+; GFX8-LABEL: gep_inbounds_nuw_alloca_nonpow2_scale:
+; GFX8:       ; %bb.0:
+; GFX8-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX8-NEXT:    s_movk_i32 s4, 0x84
+; GFX8-NEXT:    v_mul_lo_u32 v0, v0, s4
+; GFX8-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, v2, v0
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, 16, v0
+; GFX8-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen
+; GFX8-NEXT:    s_waitcnt vmcnt(0)
+; GFX8-NEXT:    s_setpc_b64 s[30:31]
+;
+; GFX9-LABEL: gep_inbounds_nuw_alloca_nonpow2_scale:
+; GFX9:       ; %bb.0:
+; GFX9-NEXT:    s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
+; GFX9-NEXT:    s_movk_i32 s4, 0x84
+; GFX9-NEXT:    v_mul_lo_u32 v0, v0, s4
+; GFX9-NEXT:    v_lshrrev_b32_e64 v2, 6, s32
+; GFX9-NEXT:    v_add_u32_e32 v0, v2, v0
+; GFX9-NEXT:    buffer_store_dword v1, v0, s[0:3], 0 offen offset:16
+; GFX9-NEXT:    s_waitcnt vmcnt(0)
+; GFX9-NEXT:    s_setpc_b64 s[30:31]
+  %alloca = alloca [5 x [33 x i32]], align 4, addrspace(5)
+  %gep1 = getelementptr inbounds nuw [5 x [33 x i32]], ptr addrspace(5) %alloca, i32 0, i32 %idx, i32 4
+  store volatile i32 %val, ptr addrspace(5) %gep1, align 4
+  ret void
+}
+
+attributes #0 = { nounwind }

@arsenm arsenm requested a review from jayfoad October 2, 2024 10:02
@arsenm arsenm marked this pull request as ready for review October 2, 2024 10:02
@arsenm arsenm force-pushed the users/arsenm/amdgpu-add-baseline-gep-flags-tests branch from 95b7c37 to f3c253f Compare October 9, 2024 05:52
Copy link
Contributor Author

arsenm commented Oct 9, 2024

Merge activity

  • Oct 9, 5:42 AM EDT: @arsenm started a stack merge that includes this pull request via Graphite.
  • Oct 9, 5:44 AM EDT: Graphite rebased this pull request as part of a merge.
  • Oct 9, 5:48 AM EDT: @arsenm merged this pull request with Graphite.

We need to know the address computation won't overflow on
older subtargets to match the addressing mode of stack instructions.
@arsenm arsenm force-pushed the users/arsenm/amdgpu-add-baseline-gep-flags-tests branch from f3c253f to c17153f Compare October 9, 2024 09:44
@arsenm arsenm merged commit 671cbcf into main Oct 9, 2024
5 of 7 checks passed
@arsenm arsenm deleted the users/arsenm/amdgpu-add-baseline-gep-flags-tests branch October 9, 2024 09:48
@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 9, 2024

LLVM Buildbot has detected a new failure on builder ml-opt-dev-x86-64 running on ml-opt-dev-x86-64-b2 while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/137/builds/6680

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/gep-flags-stack-offsets.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /b/ml-opt-dev-x86-64-b1/build/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 < /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll | /b/ml-opt-dev-x86-64-b1/build/bin/FileCheck -check-prefix=GFX8 /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
+ /b/ml-opt-dev-x86-64-b1/build/bin/FileCheck -check-prefix=GFX8 /b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
+ /b/ml-opt-dev-x86-64-b1/build/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:12:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:11:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:12:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:39:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:44:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:45:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:66:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:77:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:78:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:93:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:110:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:111:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/ml-opt-dev-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:120:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:143:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 9, 2024

LLVM Buildbot has detected a new failure on builder ml-opt-devrel-x86-64 running on ml-opt-devrel-x86-64-b2 while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/175/builds/6609

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/gep-flags-stack-offsets.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /b/ml-opt-devrel-x86-64-b1/build/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 < /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll | /b/ml-opt-devrel-x86-64-b1/build/bin/FileCheck -check-prefix=GFX8 /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
+ /b/ml-opt-devrel-x86-64-b1/build/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803
+ /b/ml-opt-devrel-x86-64-b1/build/bin/FileCheck -check-prefix=GFX8 /b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:12:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:11:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:12:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:39:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:44:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:45:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:66:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:77:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:78:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:93:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:110:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:111:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/ml-opt-devrel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:120:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:143:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 9, 2024

LLVM Buildbot has detected a new failure on builder ml-opt-rel-x86-64 running on ml-opt-rel-x86-64-b2 while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/185/builds/6592

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/gep-flags-stack-offsets.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /b/ml-opt-rel-x86-64-b1/build/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 < /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll | /b/ml-opt-rel-x86-64-b1/build/bin/FileCheck -check-prefix=GFX8 /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
+ /b/ml-opt-rel-x86-64-b1/build/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803
+ /b/ml-opt-rel-x86-64-b1/build/bin/FileCheck -check-prefix=GFX8 /b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
/b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:12:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:11:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:12:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:39:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:44:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:45:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:66:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:77:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:78:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:93:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:110:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:111:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/ml-opt-rel-x86-64-b1/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:120:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:143:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 9, 2024

LLVM Buildbot has detected a new failure on builder openmp-offload-sles-build-only running on rocm-worker-hw-04-sles while building llvm at step 8 "Add check check-llvm".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/8406

Here is the relevant piece of the build log for the reference
Step 8 (Add check check-llvm) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/gep-flags-stack-offsets.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 < /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll | /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck -check-prefix=GFX8 /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803
+ /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.build/bin/FileCheck -check-prefix=GFX8 /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:12:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:11:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:12:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:39:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:44:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:45:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:66:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:77:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:78:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:93:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:110:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:111:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:120:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:143:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
...

@nico
Copy link
Contributor

nico commented Oct 9, 2024

Looks like these are failing: http://45.33.8.238/linux/149769/step_11.txt

Please take a look and revert for now if it takes a while to fix.

@mikaelholmen
Copy link
Collaborator

mikaelholmen commented Oct 9, 2024

Looks like these are failing: http://45.33.8.238/linux/149769/step_11.txt

Please take a look and revert for now if it takes a while to fix.

Is the operand order in several instructions not deterministic? The differences when failing are like several instances of

-; GFX8-NEXT:    v_add_u32_e32 v0, vcc, v2, v0
+; GFX8-NEXT:    v_add_u32_e32 v0, vcc, v0, v2

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 9, 2024

LLVM Buildbot has detected a new failure on builder lld-x86_64-ubuntu-fast running on as-builder-4 while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/33/builds/4492

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/gep-flags-stack-offsets.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 < /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll | /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/FileCheck -check-prefix=GFX8 /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803
+ /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/bin/FileCheck -check-prefix=GFX8 /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:12:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:11:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:12:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:39:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:44:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:45:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:66:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:77:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:78:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:93:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:110:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:111:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:120:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:143:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 9, 2024

LLVM Buildbot has detected a new failure on builder premerge-monolithic-linux running on premerge-linux-1 while building llvm at step 7 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/153/builds/11342

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/gep-flags-stack-offsets.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /build/buildbot/premerge-monolithic-linux/build/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 < /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll | /build/buildbot/premerge-monolithic-linux/build/bin/FileCheck -check-prefix=GFX8 /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
+ /build/buildbot/premerge-monolithic-linux/build/bin/FileCheck -check-prefix=GFX8 /build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
+ /build/buildbot/premerge-monolithic-linux/build/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:12:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:11:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:12:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:39:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:44:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:45:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:66:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:77:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:78:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:93:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:110:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:111:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/build/buildbot/premerge-monolithic-linux/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:120:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:143:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 9, 2024

LLVM Buildbot has detected a new failure on builder clang-x86_64-debian-fast running on gribozavr4 while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/56/builds/9463

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/gep-flags-stack-offsets.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /b/1/clang-x86_64-debian-fast/llvm.obj/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 < /b/1/clang-x86_64-debian-fast/llvm.src/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll | /b/1/clang-x86_64-debian-fast/llvm.obj/bin/FileCheck -check-prefix=GFX8 /b/1/clang-x86_64-debian-fast/llvm.src/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
+ /b/1/clang-x86_64-debian-fast/llvm.obj/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803
+ /b/1/clang-x86_64-debian-fast/llvm.obj/bin/FileCheck -check-prefix=GFX8 /b/1/clang-x86_64-debian-fast/llvm.src/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:12:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:11:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:12:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:39:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:44:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:45:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:66:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:77:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:78:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:93:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:110:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:111:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:120:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:143:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 9, 2024

LLVM Buildbot has detected a new failure on builder llvm-clang-x86_64-expensive-checks-debian running on gribozavr4 while building llvm at step 6 "test-build-unified-tree-check-all".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/16/builds/6855

Here is the relevant piece of the build log for the reference
Step 6 (test-build-unified-tree-check-all) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/gep-flags-stack-offsets.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 < /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll | /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/FileCheck -check-prefix=GFX8 /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
+ /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803
+ /b/1/llvm-clang-x86_64-expensive-checks-debian/build/bin/FileCheck -check-prefix=GFX8 /b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
/b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:12:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:11:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:12:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:39:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:44:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:45:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:66:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:77:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:78:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:93:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:110:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:111:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/1/llvm-clang-x86_64-expensive-checks-debian/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:120:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:143:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
...

@llvm-ci
Copy link
Collaborator

llvm-ci commented Oct 9, 2024

LLVM Buildbot has detected a new failure on builder llvm-x86_64-debian-dylib running on gribozavr4 while building llvm at step 7 "test-build-unified-tree-check-llvm".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/9784

Here is the relevant piece of the build log for the reference
Step 7 (test-build-unified-tree-check-llvm) failure: test (failure)
******************** TEST 'LLVM :: CodeGen/AMDGPU/gep-flags-stack-offsets.ll' FAILED ********************
Exit Code: 1

Command Output (stderr):
--
RUN: at line 3: /b/1/llvm-x86_64-debian-dylib/build/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803 < /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll | /b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck -check-prefix=GFX8 /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
+ /b/1/llvm-x86_64-debian-dylib/build/bin/FileCheck -check-prefix=GFX8 /b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll
+ /b/1/llvm-x86_64-debian-dylib/build/bin/llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx803
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:12:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:11:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:12:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:39:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:44:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:45:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:66:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:77:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:78:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:93:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:110:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
<stdin>:111:2: note: possible intended match here
 v_add_u32_e32 v0, vcc, v0, v2
 ^
/b/1/llvm-x86_64-debian-dylib/llvm-project/llvm/test/CodeGen/AMDGPU/gep-flags-stack-offsets.ll:120:14: error: GFX8-NEXT: expected string not found in input
; GFX8-NEXT: v_add_u32_e32 v0, vcc, v2, v0
             ^
<stdin>:143:30: note: scanning from here
 v_lshrrev_b32_e64 v2, 6, s32
                             ^
...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:AMDGPU llvm:SelectionDAG SelectionDAGISel as well
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants