[Mlir-commits] [mlir] [MLIR][Conversion] Fix assert and print lowering in gpu.module (PR #214997)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Tue Aug 11 02:04:43 PDT 2026
================
@@ -20,3 +20,19 @@ func.func @main() {
// CHECK: %[[ADDRESS_OF:.*]] = llvm.mlir.addressof @{{.*}} : !llvm.ptr{{$}}
// CHECK: %[[GEP:.*]] = llvm.getelementptr %[[ADDRESS_OF]][0] : (!llvm.ptr) -> !llvm.ptr, !llvm.array<{{[0-9]+}} x i8>
// CHECK: llvm.call @puts(%[[GEP]]) : (!llvm.ptr) -> ()
+
+// -----
+
+gpu.module @gpu_module {
----------------
banach-space wrote:
This test should be a minimal variation of `@main` above, otherwise it's hard to tell what makes it unique or what unique feature is being tested.
```mlir
// Same as above, but wrapped in a GPU module.
gpu.module @gpu_module {
gpu.func @gpu_main() {
%a = arith.constant 0 : i1
cf.assert %a, "assertion foo"
return
}
}
```
Similar suggestion for the other test added in this file.
https://github.com/llvm/llvm-project/pull/214997
More information about the Mlir-commits
mailing list