[Mlir-commits] [mlir] [MLIR] fix invalid `scf.index_switch` lowering to `cf.switch` when case values are large (PR #111590)
Matthias Springer
llvmlistbot at llvm.org
Thu Oct 10 00:57:48 PDT 2024
================
@@ -691,11 +691,14 @@ IndexSwitchLowering::matchAndRewrite(IndexSwitchOp op,
// Cast switch index to integer case value.
Value caseValue = rewriter.create<arith::IndexCastOp>(
- op.getLoc(), rewriter.getI32Type(), op.getArg());
+ op.getLoc(), rewriter.getI64Type(), op.getArg());
----------------
matthias-springer wrote:
I'm surprised to see an `IndexCast` here. Isn't there a different mechanism in MLIR to specify how `IndexType` is lowered?
https://github.com/llvm/llvm-project/pull/111590
More information about the Mlir-commits
mailing list