[llvm] [SLP] NFC. ShuffleInstructionBuilder::add V1->getType() is always a (PR #99842)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 22 11:15:09 PDT 2024


================
@@ -12042,6 +12042,9 @@ class BoUpSLP::ShuffleInstructionBuilder final : public BaseShuffleAnalysis {
   /// Adds 2 input vectors and the mask for their shuffling.
   void add(Value *V1, Value *V2, ArrayRef<int> Mask) {
     assert(V1 && V2 && !Mask.empty() && "Expected non-empty input vectors.");
+    assert(isa<FixedVectorType>(V1->getType()) &&
+           isa<FixedVectorType>(V2->getType()) &&
+           "castToScalarTyElem expect V1 and V2 to be FixedVectorType");
----------------
alexey-bataev wrote:

expects

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


More information about the llvm-commits mailing list