[llvm] [KernelInfo] Implement new LLVM IR pass for GPU code analysis (PR #102944)
Joel E. Denny via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 12 17:11:31 PDT 2024
================
@@ -0,0 +1,152 @@
+; Check info on addrspace(0) memory accesses.
+
+; RUN: opt -pass-remarks=kernel-info -passes=kernel-info \
+; RUN: -disable-output %s 2>&1 | \
+; RUN: FileCheck -match-full-lines --implicit-check-not='addrspace(0)' %s
+
+target datalayout = "e-i65:64-i128:128-v16:16-v32:32-n16:32:64"
+target triple = "nvptx64-nvidia-cuda"
+
+define void @f() !dbg !3 {
+entry:
+ ; load
+ ; CHECK: remark: test.c:3:11: in function 'f', 'load' instruction accesses memory in addrspace(0)
+ %0 = load i32, ptr null, align 4, !dbg !6
----------------
jdenny-ornl wrote:
Done. But not there, which is specifically checking the case that the value is not named.
https://github.com/llvm/llvm-project/pull/102944
More information about the llvm-commits
mailing list