[Mlir-commits] [mlir] [mlir][cf] Fix APInt comparison crash in `foldSwitch` (PR #206407)

Longsheng Mou llvmlistbot at llvm.org
Mon Jun 29 04:41:08 PDT 2026


CoTinker wrote:

When convert to LLVM, there is  a `indexBitwidth` option to specify index bit width.
https://github.com/llvm/llvm-project/blob/5d24d4fe0031f026856e70e0b33687c13b7d277c/mlir/include/mlir/Conversion/Passes.td#L178-L189

And the type converter in LLVM is like:
```
Type LLVMTypeConverter::getIndexType() const {
  return IntegerType::get(&getContext(), getIndexTypeBitwidth());
}

Type LLVMTypeConverter::convertIndexType(IndexType type) const {
  return getIndexType();
}
```

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


More information about the Mlir-commits mailing list