[Mlir-commits] [mlir] [mlir][Vector] Add support for poison indices to `Extract/IndexOp` (PR #123488)
Kunwar Grover
llvmlistbot at llvm.org
Tue Jan 28 00:52:36 PST 2025
================
@@ -26,6 +26,15 @@ def Vector_Dialect : Dialect {
// Base class for Vector dialect ops.
class Vector_Op<string mnemonic, list<Trait> traits = []> :
- Op<Vector_Dialect, mnemonic, traits>;
+ Op<Vector_Dialect, mnemonic, traits> {
+
+ // Includes definitions for operations that support the use of poison values
+ // within positive index ranges.
+ code extraPoisonClassDeclaration = [{
+ // Integer to represent a poison index within a static and positive integer
+ // range.
+ static constexpr int64_t kPoisonIndex = -1;
+ }];
----------------
Groverkss wrote:
No opinion here, but -1 is a very easy to misplace number that someone can write.
https://github.com/llvm/llvm-project/pull/123488
More information about the Mlir-commits
mailing list