[Mlir-commits] [mlir] [mlir][emitc] Add op modelling C expressions (PR #71631)
Simon Camphausen
llvmlistbot at llvm.org
Thu Nov 9 06:21:44 PST 2023
================
@@ -128,6 +128,23 @@ func.func @test_assign(%arg1: f32) {
return
}
+func.func @test_expression(%arg0: i32, %arg1: i32, %arg2: i32, %arg3: f32, %arg4: f32) -> i32 {
+ %c7 = "emitc.constant"() {value = 7 : i32} : () -> i32
+ %q = emitc.expression : i32 {
+ %a = emitc.rem %arg1, %c7 : (i32, i32) -> i32
+ emitc.yield %a : i32
+ }
+ %r = emitc.expression {do_not_inline} : i32 {
----------------
simon-camp wrote:
```suggestion
%r = emitc.expression noinline : i32 {
```
https://github.com/llvm/llvm-project/pull/71631
More information about the Mlir-commits
mailing list