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

Simon Camphausen llvmlistbot at llvm.org
Thu Jun 13 08:09:01 PDT 2024


================
@@ -234,26 +225,26 @@ func.func @test_misplaced_yield() {
 
 // -----
 
-func.func @test_assign_to_non_variable(%arg1: f32, %arg2: f32) {
-  // expected-error @+1 {{'emitc.assign' op requires first operand (<block argument> of type 'f32' at index: 1) to be a Variable or subscript}}
-  emitc.assign %arg1 : f32 to %arg2 : f32
+func.func @test_assign_to_non_variable(%arg1: f32, %arg2: !emitc.lvalue<f32>) {
+  // expected-error @+1 {{'emitc.assign' op cannot assign to block argument}}
+  emitc.assign %arg1 : f32 to %arg2 : !emitc.lvalue<f32>
----------------
simon-camp wrote:

I think I will throw an error in the emitter for now, so that `func.func`, `emitc.func` are handled the same. (If there are no objections) 

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


More information about the Mlir-commits mailing list