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.
This commit is contained in:
Matt Arsenault 2020-07-09 10:22:22 -04:00
parent 3514f58fbe
commit fdde69aac9
1 changed files with 3 additions and 3 deletions

View File

@ -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: 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 ; 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 %gep = getelementptr i32, i32 addrspace(1)* %ptr, i32 %id
%n = load i32, i32 addrspace(1)* %gep %n = load i32, i32 addrspace(1)* %gep
%alloca = alloca i32, i32 %n, align 4, addrspace(5) %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 ret void
} }
define void @func_dynamic_stackalloc_vgpr_align4(i32 %n) { define void @func_dynamic_stackalloc_vgpr_align4(i32 %n) {
%alloca = alloca i32, i32 %n, align 4, addrspace(5) %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 ret void
} }