Files
clang-p2996/mlir/lib/Dialect/Arith/IR/InferIntRangeInterfaceImpls.cpp
Ian Wood 441b82b20b [mlir][NFC] IntegerRangeAnalysis: don't loop over splat attr (#115399)
Reland https://github.com/llvm/llvm-project/pull/115229 which was
reverted by https://github.com/llvm/llvm-project/pull/115388 because it
was hitting an assertion in IREE. From the original change: If the
`DenseIntElementsAttr` is a splat value, there is no need to loop over
the entire attr. Instead, just update with the splat value.


The problem with the original implementation is that `SplatElementsAttr`
might be an attr of non `APInt` (e.g. float) elements. Instead, check if
`DenseIntElementsAttr` is splat and use the splat value. Added a test to
ensure there's no crash when handling float attrs.
2024-11-08 13:41:36 -08:00

14 KiB