[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 01:00:30 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:
Why do we have to convert `index` values at all? Can we defer this to the point where we lower to LLVM?
https://github.com/llvm/llvm-project/pull/111590
More information about the Mlir-commits
mailing list