[Mlir-commits] [mlir] [mlir][vector] Update the folder for vector.{insert|extract} (PR #136579)
Fehr Mathieu
llvmlistbot at llvm.org
Mon Apr 21 13:11:16 PDT 2025
math-fehr wrote:
> Why do you think we should treat -1 (as an attribute) and %c_neg_1 (an SSA value that's a compile-time constant equal to -1) differently? Is there documentation I'm missing, or another rationale?
That's probably where I'm misunderstanding something.
I thought that `-1` (as an attribute) corresponded to a `%poison = ub.poison : index` value.
Since only constants that are out of bounds are accetped in `vector.insert` anyway, it would be fine (but weird I agree) to have a different meaning than a `%neg_1 = arith.constant -1 : index` constant.
But if the meaning is for `-1` to actually represent `-1`, and that the semantics of `vector.insert` OOB accesses are only defined for `-1`, then that's fine for me. I guess my main issue is that we define only the semantics for `-1` and not for other OOB values. I guess things would be clearer if we decide what is the meaning of any OOB access, wether we decide it is UB or poison.
https://github.com/llvm/llvm-project/pull/136579
More information about the Mlir-commits
mailing list