[all-commits] [llvm/llvm-project] 441b82: [mlir][NFC] IntegerRangeAnalysis: don't loop over ...

Ian Wood via All-commits all-commits at lists.llvm.org
Fri Nov 8 13:41:58 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 441b82b20bf3a622155354e17ae66e0ccff50796
      https://github.com/llvm/llvm-project/commit/441b82b20bf3a622155354e17ae66e0ccff50796
  Author: Ian Wood <ianwood2024 at u.northwestern.edu>
  Date:   2024-11-08 (Fri, 08 Nov 2024)

  Changed paths:
    M mlir/lib/Dialect/Arith/IR/InferIntRangeInterfaceImpls.cpp
    M mlir/test/Dialect/Vector/int-range-interface.mlir

  Log Message:
  -----------
  [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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list