[Mlir-commits] [mlir] [mlir][TOSA] restore unrealized casts when lowering rescale ops (PR #141096)
Thomas Preud'homme
llvmlistbot at llvm.org
Fri May 23 04:42:49 PDT 2025
RoboTux wrote:
Hi Artem,
First of all my apologies for the trouble my commit caused. How do you manage to lower those unrealized cast? When the only way to convey signedness was through signed/unsigned type we had unrealized_conversion_cast legalization failure for i8->ui8 when lowering from Arith to SPIR-V. I've just tried again with your patch and a rescale from i8 to ui8 and I'm getting:
rescale.mlir:6:8: error: failed to legalize operation 'builtin.unrealized_conversion_cast'
Is unrealized_conversion_cast the correct way to cast between signed/unsigned and signless type? If yes then it's just a bug in the SPIR-V conversion and this patch is fine.
https://github.com/llvm/llvm-project/pull/141096
More information about the Mlir-commits
mailing list