[Mlir-commits] [mlir] [MLIR] Implement emulation of static indexing subbyte type vector stores (PR #115922)

Diego Caballero llvmlistbot at llvm.org
Sun Jan 19 19:12:19 PST 2025


================
@@ -685,9 +938,9 @@ struct ConvertVectorMaskedLoad final
         loc, newBitcastType, rewriter.getZeroAttr(newBitcastType));
     if (!foldedIntraVectorOffset) {
       passthru = dynamicallyInsertSubVector(
-          rewriter, loc, dyn_cast<TypedValue<VectorType>>(passthru),
-          emptyVector, linearizedInfo.intraDataOffset, origElements);
-    } else if (isUnalignedEmulation) {
+          rewriter, loc, cast<VectorValue>(passthru), emptyVector,
----------------
dcaballe wrote:

I'm not sure if enforcing all these castings to `TypeValue` are worth it. Wouldn't checking the type within an assert be more efficient for the `Release` version and cleaner?  We may also end up checking the type too many times, depending on when the type check happens in ValueType...

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


More information about the Mlir-commits mailing list