[Mlir-commits] [mlir] [mlir][emitc] Add EmitC lowering for arith.trunci, arith.extsi, arith.extui (PR #91491)

Simon Camphausen llvmlistbot at llvm.org
Wed May 22 04:22:32 PDT 2024


https://github.com/simon-camp requested changes to this pull request.

I think truncation to i1 needs to be handled specially, as the arith dialect discards the high bits, but a conversion to bool is similar to `x != 0`. For the same reason signed extension from i1 should be rejected by this pattern. Unsigned extension from i1 works correctly I think.

https://godbolt.org/z/sEcdnz4s4

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


More information about the Mlir-commits mailing list