[Mlir-commits] [mlir] [mlir][arith] Fix crash when narrowing or truncating to i0 (PR #179894)

Akimasa Watanuki llvmlistbot at llvm.org
Thu Feb 5 05:25:09 PST 2026


================
@@ -245,6 +245,11 @@ void arith::TruncIOp::inferResultRanges(ArrayRef<ConstantIntRanges> argRanges,
                                         SetIntRangeFn setResultRange) {
   unsigned destWidth =
       ConstantIntRanges::getStorageBitwidth(getResult().getType());
+
+  // Shoaib's Ultimate Guard: If width is 0, don't calculate ranges.
----------------
Men-cotton wrote:

Drop it.

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


More information about the Mlir-commits mailing list