[Mlir-commits] [mlir] [TOSA] Usage of 32bit integer for 'index to float' in rfft2d (PR #75098)
Jakub Kuderski
llvmlistbot at llvm.org
Tue Dec 12 07:43:30 PST 2023
================
@@ -2284,8 +2284,11 @@ struct RFFT2dConverter final : public OpRewritePattern<RFFT2dOp> {
static Value castIndexToFloat(OpBuilder &builder, Location loc,
FloatType type, Value value) {
- auto integerVal =
- builder.create<arith::IndexCastUIOp>(loc, builder.getI64Type(), value);
+ auto integerVal = builder.create<arith::IndexCastUIOp>(
+ loc,
+ 32 < type.getIntOrFloatBitWidth() ? builder.getI64Type()
----------------
kuhar wrote:
Also, should we use an integer type of the same bitwidth? For example `i16` when casting to `f16`.
https://github.com/llvm/llvm-project/pull/75098
More information about the Mlir-commits
mailing list