[Mlir-commits] [mlir] [mlir][tensor] fix out-of-bound index in tensor.dim (PR #85901)
Mehdi Amini
llvmlistbot at llvm.org
Wed Mar 20 01:06:41 PDT 2024
================
@@ -738,11 +741,11 @@ OpFoldResult DimOp::fold(FoldAdaptor adaptor) {
if (!tensorType)
return {};
- // Out of bound indices produce undefined behavior but are still valid IR.
- // Don't choke on them.
+ // Fold dim to posion if the index is out of bound. Poison represents
----------------
joker-eph wrote:
```suggestion
// Fold dim to poison if the index is out of bound. Poison represents
```
https://github.com/llvm/llvm-project/pull/85901
More information about the Mlir-commits
mailing list