[Mlir-commits] [mlir] [mlir][emitc] Support conversion of arith.divsi and arith.remsi to EmitC (PR #93450)
Marius Brehler
llvmlistbot at llvm.org
Mon May 27 05:19:02 PDT 2024
================
@@ -88,6 +88,22 @@ func.func @arith_index(%arg0: index, %arg1: index) {
// -----
+func.func @arith_signed_integer_div(%arg0: i32, %arg1: i32) {
+ // CHECK: emitc.div %arg0, %arg1 : (i32, i32) -> i32
+ %0 = arith.divsi %arg0, %arg1 : i32
+ return
+}
+
+// -----
+
+func.func @arith_signed_integer_rem(%arg0: i32, %arg1: i32) {
+ // CHECK: emitc.rem %arg0, %arg1 : (i32, i32) -> i32
+ %0 = arith.remsi %arg0, %arg1 : i32
+ return
+}
----------------
marbre wrote:
Those 2 tests could be combined as realized for the`arith_integer_ops` or `arith_integer_ops_signed_nsw` tests.
https://github.com/llvm/llvm-project/pull/93450
More information about the Mlir-commits
mailing list