[Mlir-commits] [mlir] Revert "[mlir] IntegerRangeAnalysis: don't loop over splat attr " (PR #115388)

Ian Wood llvmlistbot at llvm.org
Thu Nov 7 15:18:18 PST 2024


https://github.com/IanWood1 updated https://github.com/llvm/llvm-project/pull/115388

>From 8220432016133c50d2dac6c71e6efd37be1da38a Mon Sep 17 00:00:00 2001
From: Ian Wood <75152913+IanWood1 at users.noreply.github.com>
Date: Thu, 7 Nov 2024 14:55:48 -0800
Subject: [PATCH] Revert "[mlir] IntegerRangeAnalysis: don't loop over splat
 attr  (#115229)"

This reverts commit 3deee235986802694175259e078dfad0edcb40ed.
---
 mlir/lib/Dialect/Arith/IR/InferIntRangeInterfaceImpls.cpp | 5 -----
 1 file changed, 5 deletions(-)

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