[AArch64] Attempt to fix bots by ensuring legalized type is a vector
authorDavid Green <david.green@arm.com>
Wed, 27 Apr 2022 14:36:15 +0000 (15:36 +0100)
committerDavid Green <david.green@arm.com>
Wed, 27 Apr 2022 14:36:15 +0000 (15:36 +0100)
llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp

index a5faff6..ce71415 100644 (file)
@@ -2599,7 +2599,7 @@ InstructionCost AArch64TTIImpl::getShuffleCost(TTI::ShuffleKind Kind,
   std::pair<InstructionCost, MVT> LT = TLI->getTypeLegalizationCost(DL, Tp);
   // If we have a Mask, and the LT is being legalized somehow, split the Mask
   // into smaller vectors and sum the cost of each shuffle.
-  if (!Mask.empty() && isa<FixedVectorType>(Tp) &&
+  if (!Mask.empty() && isa<FixedVectorType>(Tp) && LT.second.isVector() &&
       Tp->getScalarSizeInBits() == LT.second.getScalarSizeInBits() &&
       cast<FixedVectorType>(Tp)->getNumElements() >
           LT.second.getVectorNumElements() &&