[Mlir-commits] [mlir] [mlir][Vector] Refactor VectorEmulateNarrowType.cpp (PR #123529)

Alan Li llvmlistbot at llvm.org
Tue Mar 11 08:39:12 PDT 2025


================
@@ -1127,7 +1159,8 @@ struct ConvertVectorTransferRead final
     auto origElements = op.getVectorType().getNumElements();
 
     // Note, per-element-alignment was already verified above.
-    bool isFullyAligned = origElements % emulatedPerContainerElem == 0;
+    bool isFullyAligned =
----------------
lialan wrote:

I actually prefer option 3..... Once `isPerElementAlligned` is tested we don't need subsequent references to it.

It also reduces mental burden while reading the code.

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


More information about the Mlir-commits mailing list