[Mlir-commits] [mlir] [WIP][mlir][EmitC] Model lvalues as a type in EmitC (PR #91475)
Matthias Gehre
llvmlistbot at llvm.org
Thu May 9 22:46:47 PDT 2024
================
@@ -85,8 +85,12 @@ func.func @opaque_types(%arg0: !emitc.opaque<"bool">, %arg1: !emitc.opaque<"char
func.func @apply(%arg0: i32) -> !emitc.ptr<i32> {
// CHECK: int32_t* [[V2]] = &[[V1]];
%0 = emitc.apply "&"(%arg0) : (i32) -> !emitc.ptr<i32>
----------------
mgehre-amd wrote:
I think we should only allow applying address-of to lvalues, i.e.
`%0 = emitc.apply "&"(%arg0) : (!emitc.lvalue<i32>) -> !emitc.ptr<i32>`
C only allows it on lvalues, too.
https://github.com/llvm/llvm-project/pull/91475
More information about the Mlir-commits
mailing list