[PATCH] D134741: [amdgpu] Error, instead of miscompile, anonymous kernels using lds
Jon Chesterfield via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 28 07:37:01 PDT 2022
JonChesterfield added a comment.
I like the test idea but a credible guess at how to write one is not working. Can you see the mistake in this? `not --crash opt < %s` has a couple of existing examples in tree.
; RUN: not --crash opt -S -mtriple=amdgcn-- -amdgpu-lower-module-lds < %s | FileCheck %s
; RUN: not --crash opt -S -mtriple=amdgcn-- -passes=amdgpu-lower-module-lds < %s | FileCheck %s
@var1 = addrspace(3) global i32 undef, align 8
; CHECK: LLVM ERROR: Anonymous kernels cannot use LDS variables
define amdgpu_kernel void @0() {
%val0 = load i32, i32 addrspace(3)* @var1
%val1 = add i32 %val0, 4
store i32 %val1, i32 addrspace(3)* @var1
ret void
}
Fails with exit code: 2 and the stack trace, though it also prints that error exactly as specified by the check line
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134741/new/
https://reviews.llvm.org/D134741
More information about the llvm-commits
mailing list