File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
test/Conversion/GPUToNVVM Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -543,9 +543,9 @@ LogicalResult GPUPrintfOpToVPrintfLowering::matchAndRewrite(
543543 // the device code, not the host code
544544 auto moduleOp = gpuPrintfOp->getParentOfType <gpu::GPUModuleOp>();
545545
546- // Convert the location to a valid global location of type FileLineColLoc if
547- // found else UnknownLoc. Remove any metadata from the location which is not
548- // valid for a global location .
546+ // Create a valid global location removing any metadata attached to the
547+ // location as debug info metadata inside of a function cannot be used outside
548+ // of that function .
549549 Location globalLoc = loc->findInstanceOfOrUnknown <FileLineColLoc>();
550550
551551 auto vprintfType =
Original file line number Diff line number Diff line change 1313// CHECK-DAG: [[LOC:#[a-zA-Z0-9_]+]] = loc("foo.mlir":0:0)
1414#loc = loc (" foo.mlir" :0 :0 )
1515
16- gpu.module @test_module_56 {
16+ gpu.module @test_module_1 {
1717 // CHECK-DAG: llvm.mlir.global internal constant @[[$PRINT_GLOBAL0:[A-Za-z0-9_]+]]("Hello, world with location\0A\00") {addr_space = 0 : i32} loc([[LOC]])
1818 // CHECK-DAG: llvm.func @vprintf(!llvm.ptr, !llvm.ptr) -> i32 loc([[LOC]])
1919
You can’t perform that action at this time.
0 commit comments