[llvm] 853beb5 - [FuzzMutate] Support scalable shufflevector

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 11 05:31:01 PST 2022


Author: Nikita Popov
Date: 2022-03-11T14:20:40+01:00
New Revision: 853beb55e14615ade795e18d218305c1dfdb5181

URL: https://github.com/llvm/llvm-project/commit/853beb55e14615ade795e18d218305c1dfdb5181
DIFF: https://github.com/llvm/llvm-project/commit/853beb55e14615ade795e18d218305c1dfdb5181.diff

LOG: [FuzzMutate] Support scalable shufflevector

Added: 
    

Modified: 
    llvm/lib/FuzzMutate/Operations.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/FuzzMutate/Operations.cpp b/llvm/lib/FuzzMutate/Operations.cpp
index 7db24bb98b77b..7443d49967c5c 100644
--- a/llvm/lib/FuzzMutate/Operations.cpp
+++ b/llvm/lib/FuzzMutate/Operations.cpp
@@ -309,12 +309,12 @@ static SourcePred validShuffleVectorIndex() {
     return ShuffleVectorInst::isValidOperands(Cur[0], Cur[1], V);
   };
   auto Make = [](ArrayRef<Value *> Cur, ArrayRef<Type *> Ts) {
-    auto *FirstTy = cast<FixedVectorType>(Cur[0]->getType());
+    auto *FirstTy = cast<VectorType>(Cur[0]->getType());
     auto *Int32Ty = Type::getInt32Ty(Cur[0]->getContext());
     // TODO: It's straighforward to make up reasonable values, but listing them
     // exhaustively would be insane. Come up with a couple of sensible ones.
     return std::vector<Constant *>{UndefValue::get(
-        FixedVectorType::get(Int32Ty, FirstTy->getNumElements()))};
+        VectorType::get(Int32Ty, FirstTy->getElementCount()))};
   };
   return {Pred, Make};
 }


        


More information about the llvm-commits mailing list