[Mlir-commits] [mlir] [mlir][gpu] Fix bug with gpu.printf global location (PR #142872)

River Riddle llvmlistbot at llvm.org
Wed Jun 4 16:56:06 PDT 2025


================
@@ -0,0 +1,24 @@
+// RUN: mlir-opt %s -convert-gpu-to-nvvm='has-redux=1' -mlir-print-debuginfo | FileCheck %s
+
+#di_file = #llvm.di_file<"foo.mlir" in "/tmp/">
+#di_compile_unit = #llvm.di_compile_unit<
+  id = distinct[0]<>, sourceLanguage = DW_LANG_C, file = #di_file,
+  producer = "MLIR", isOptimized = true, emissionKind = Full
+>
+#di_subprogram = #llvm.di_subprogram<
+  compileUnit = #di_compile_unit, scope = #di_file, name = "test_const_printf_with_loc",
+  file = #di_file, subprogramFlags = "Definition"
+>
+
+// CHECK-DAG: [[LOC:#[a-zA-Z0-9_]+]] = loc("foo.mlir":0:0)
+#loc = loc("foo.mlir":0:0)
+
+gpu.module @test_module_1 {
----------------
River707 wrote:

Can you add a comment before this test on what it's checking for?

https://github.com/llvm/llvm-project/pull/142872


More information about the Mlir-commits mailing list