[llvm] [SLP][REVEC] Make SLP support revectorization (-slp-revec) and add simple test. (PR #98269)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 15 04:02:15 PDT 2024


================
@@ -11807,10 +11824,10 @@ class BoUpSLP::ShuffleInstructionBuilder final : public BaseShuffleAnalysis {
   Value *castToScalarTyElem(Value *V,
                             std::optional<bool> IsSigned = std::nullopt) {
     auto *VecTy = cast<VectorType>(V->getType());
-    if (VecTy->getElementType() == ScalarTy)
+    if (VecTy->getElementType() == ScalarTy->getScalarType())
----------------
alexey-bataev wrote:

Can you add the assertion, that ScalarTy is either the scalar or has the same number of elements as VecTy?

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


More information about the llvm-commits mailing list