[Mlir-commits] [mlir] [mlir][Vector] Remove uses of vector.extractelement/vector.insertelement (PR #113827)

Andrzej WarzyƄski llvmlistbot at llvm.org
Mon Oct 28 10:57:56 PDT 2024


================
@@ -756,7 +756,8 @@ struct DecomposePrintOpConversion : public VectorToSCFPattern<vector::PrintOp> {
     if (vectorType.getRank() != 1) {
       // Flatten n-D vectors to 1D. This is done to allow indexing with a
       // non-constant value (which can currently only be done via
-      // vector.extractelement for 1D vectors).
+      // vector.extract for 1D vectors).
+      // TODO: vector.extract supports N-D non-constant indices now.
----------------
banach-space wrote:

Let's either remove this block (preferred) or rephrase the outdated comment - right now it's not clear what the TODO is (missing verb). 

Suggestion (but I'd really prefer this being removed instead):
```cpp
      // Flatten n-D vectors to 1D. This is done for historical reasons and should be removed (using dynamic indices to extract n-D vectors was not supported when this was added).
      // TODO: Remove this block
```

Or something similar :)

https://github.com/llvm/llvm-project/pull/113827


More information about the Mlir-commits mailing list