[Mlir-commits] [mlir] [mlir][spirv][webgpu] Add lowering of IAddCarry to IAdd (PR #68495)
Finn Plummer
llvmlistbot at llvm.org
Sat Oct 14 07:21:03 PDT 2023
inbelic wrote:
@kuhar Awesome thanks. Have got the runner test locally and also get the wrong behaviour when using the negative minimum integers for the input. I believe this is because the `Signedness` is set for the integer type. While `arith.addui_extended` and `spirv.IAddCarry` will interpret the bits as unsigned, `spirv.IAddOp` does not and that is why it does not provide our desired behaviour to overflow when we add 1 to it. All of this to say, that if you set `-2^31-1` to `2^32-1` instead, then we have the expected behaviour.
However, imo it should be that the negative number is interpreted as an unsigned integer and then we unfortunately will need to use a different solution.
https://github.com/llvm/llvm-project/pull/68495
More information about the Mlir-commits
mailing list