[Mlir-commits] [mlir] [WIP][mlir][EmitC] Model lvalues as a type in EmitC (PR #91475)

Simon Camphausen llvmlistbot at llvm.org
Mon May 13 01:46:31 PDT 2024


================
@@ -4,7 +4,8 @@
 func.func @load_store(%arg0: !emitc.array<4x8xf32>, %arg1: !emitc.array<3x5xf32>, %arg2: index, %arg3: index) {
   %0 = emitc.subscript %arg0[%arg2, %arg3] : <4x8xf32>, index, index
   %1 = emitc.subscript %arg1[%arg2, %arg3] : <3x5xf32>, index, index
-  emitc.assign %0 : f32 to %1 : f32
+  %2 = emitc.lvalue_to_rvalue %0 : !emitc.lvalue<f32>
----------------
simon-camp wrote:

See my other comment. The conversion ops don't get materialized on their own but implicitly on every use of the result. I'm happy to discuss alternatives.

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


More information about the Mlir-commits mailing list