[Mlir-commits] [mlir] [mlir][emitc] Lower arith.andi, arith.ori, arith.xori to EmitC (PR #93666)
Simon Camphausen
llvmlistbot at llvm.org
Wed May 29 05:44:32 PDT 2024
================
@@ -88,6 +88,44 @@ func.func @arith_index(%arg0: index, %arg1: index) {
// -----
+// CHECK-LABEL: arith_bitwise
+// CHECK-SAME: %[[ARG0:.*]]: i32, %[[ARG1:.*]]: i32
+func.func @arith_bitwise(%arg0: i32, %arg1: i32) {
+ // CHECK: %[[C1:[^ ]*]] = emitc.cast %[[ARG0]] : i32 to ui32
+ // CHECK: %[[C2:[^ ]*]] = emitc.cast %[[ARG1]] : i32 to ui32
+ // CHECK: %[[AND:[^ ]*]] = emitc.bitwise_and %[[C1]], %[[C2]] : (ui32, ui32) -> ui32
+ // CHECK: %[[C3:[^ ]*]] = emitc.cast %[[AND]] : ui32 to i32
+ %5 = arith.andi %arg0, %arg1 : i32
----------------
simon-camp wrote:
Renumber the results from 0 to 2
https://github.com/llvm/llvm-project/pull/93666
More information about the Mlir-commits
mailing list