[llvm] fdde69a - AMDGPU/GlobalISel: Work around verifier error in test

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 9 07:24:23 PDT 2020


Author: Matt Arsenault
Date: 2020-07-09T10:24:16-04:00
New Revision: fdde69aac9b99a5cda49c5b738dc8dc67ea4cbbd

URL: https://github.com/llvm/llvm-project/commit/fdde69aac9b99a5cda49c5b738dc8dc67ea4cbbd
DIFF: https://github.com/llvm/llvm-project/commit/fdde69aac9b99a5cda49c5b738dc8dc67ea4cbbd.diff

LOG: AMDGPU/GlobalISel: Work around verifier error in test

The unfortunate split between finalizeLowering and the selector pass
means there's a point where the verifier fails. The DAG selector pass
skips the verifier, but this seems to not work when using the
GlobalISel fallback.

Added: 
    

Modified: 
    llvm/test/CodeGen/AMDGPU/GlobalISel/dynamic-alloca-divergent.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/AMDGPU/GlobalISel/dynamic-alloca-divergent.ll b/llvm/test/CodeGen/AMDGPU/GlobalISel/dynamic-alloca-divergent.ll
index df536962e1b2..256b95d222be 100644
--- a/llvm/test/CodeGen/AMDGPU/GlobalISel/dynamic-alloca-divergent.ll
+++ b/llvm/test/CodeGen/AMDGPU/GlobalISel/dynamic-alloca-divergent.ll
@@ -1,4 +1,4 @@
-; RUN: not llc -global-isel -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -global-isel-abort=2 -pass-remarks-missed="gisel.*" -o /dev/null 2>&1 %s | FileCheck -check-prefix=ERR %s
+; RUN: not llc -global-isel -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -global-isel-abort=2 -pass-remarks-missed="gisel.*" -verify-machineinstrs -o /dev/null 2>&1 %s | FileCheck -check-prefix=ERR %s
 
 ; ERR: remark: <unknown>:0:0: cannot select: %{{[0-9]+}}:sreg_32(p5) = G_DYN_STACKALLOC %{{[0-9]+}}:vgpr(s32), 1 (in function: kernel_dynamic_stackalloc_vgpr_align4)
 ; ERR-NEXT: warning: Instruction selection used fallback path for kernel_dynamic_stackalloc_vgpr_align4
@@ -13,13 +13,13 @@ define amdgpu_kernel void @kernel_dynamic_stackalloc_vgpr_align4(i32 addrspace(1
   %gep = getelementptr i32, i32 addrspace(1)* %ptr, i32 %id
   %n = load i32, i32 addrspace(1)* %gep
   %alloca = alloca i32, i32 %n, align 4, addrspace(5)
-  store volatile i32 0, i32 addrspace(5)* %alloca
+  store volatile i32 addrspace(5)* %alloca, i32 addrspace(5)* addrspace(1)* undef
   ret void
 }
 
 define void @func_dynamic_stackalloc_vgpr_align4(i32 %n) {
   %alloca = alloca i32, i32 %n, align 4, addrspace(5)
-  store volatile i32 0, i32 addrspace(5)* %alloca
+  store volatile i32 addrspace(5)* %alloca, i32 addrspace(5)* addrspace(1)* undef
   ret void
 }
 


        


More information about the llvm-commits mailing list