[Mlir-commits] [mlir] cd022b7 - Revert "[mlir] IntegerRangeAnalysis: don't loop over splat..." (#115388)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Nov 7 15:48:37 PST 2024
Author: Ian Wood
Date: 2024-11-07T15:48:33-08:00
New Revision: cd022b7b2aa9e4a5762c4e82e24b228114956e3b
URL: https://github.com/llvm/llvm-project/commit/cd022b7b2aa9e4a5762c4e82e24b228114956e3b
DIFF: https://github.com/llvm/llvm-project/commit/cd022b7b2aa9e4a5762c4e82e24b228114956e3b.diff
LOG: Revert "[mlir] IntegerRangeAnalysis: don't loop over splat..." (#115388)
Hitting assertion in IREE
https://github.com/iree-org/iree/actions/runs/11732283897/job/32684201665?pr=19066
```
iree-compile: /__w/iree/iree/third_party/llvm-project/mlir/include/mlir/IR/BuiltinAttributes.h:423: auto mlir::DenseElementsAttr::getValues() const [T = llvm::APInt]: Assertion `succeeded(range) && "element type cannot be iterated"' failed.
```
Reverts llvm/llvm-project#115229
Added:
Modified:
mlir/lib/Dialect/Arith/IR/InferIntRangeInterfaceImpls.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Arith/IR/InferIntRangeInterfaceImpls.cpp b/mlir/lib/Dialect/Arith/IR/InferIntRangeInterfaceImpls.cpp
index 59c9759d35393f..8682294c8a6972 100644
--- a/mlir/lib/Dialect/Arith/IR/InferIntRangeInterfaceImpls.cpp
+++ b/mlir/lib/Dialect/Arith/IR/InferIntRangeInterfaceImpls.cpp
@@ -40,11 +40,6 @@ void arith::ConstantOp::inferResultRanges(ArrayRef<ConstantIntRanges> argRanges,
setResultRange(getResult(), ConstantIntRanges::constant(value));
return;
}
- if (auto splatAttr = llvm::dyn_cast_or_null<SplatElementsAttr>(getValue())) {
- setResultRange(getResult(), ConstantIntRanges::constant(
- splatAttr.getSplatValue<APInt>()));
- return;
- }
if (auto arrayCstAttr =
llvm::dyn_cast_or_null<DenseIntElementsAttr>(getValue())) {
std::optional<ConstantIntRanges> result;
More information about the Mlir-commits
mailing list