[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:31 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:

nit: it's more common to see constants as the RHS of comparison operators

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


More information about the Mlir-commits mailing list