diff --git a/llvm/tools/llvm-stress/llvm-stress.cpp b/llvm/tools/llvm-stress/llvm-stress.cpp --- a/llvm/tools/llvm-stress/llvm-stress.cpp +++ b/llvm/tools/llvm-stress/llvm-stress.cpp @@ -237,7 +237,7 @@ return ConstantFP::getAllOnesValue(Tp); return ConstantFP::getNullValue(Tp); } else if (Tp->isVectorTy()) { - VectorType *VTp = cast(Tp); + auto *VTp = cast(Tp); std::vector TempValues; TempValues.reserve(VTp->getNumElements()); @@ -482,10 +482,13 @@ void Act() override { Value *Val0 = getRandomVectorValue(); - Value *V = ExtractElementInst::Create(Val0, - ConstantInt::get(Type::getInt32Ty(BB->getContext()), - getRandom() % cast(Val0->getType())->getNumElements()), - "E", BB->getTerminator()); + Value *V = ExtractElementInst::Create( + Val0, + ConstantInt::get( + Type::getInt32Ty(BB->getContext()), + getRandom() % + cast(Val0->getType())->getNumElements()), + "E", BB->getTerminator()); return PT->push_back(V); } }; @@ -498,7 +501,7 @@ Value *Val0 = getRandomVectorValue(); Value *Val1 = getRandomValue(Val0->getType()); - unsigned Width = cast(Val0->getType())->getNumElements(); + unsigned Width = cast(Val0->getType())->getNumElements(); std::vector Idxs; Type *I32 = Type::getInt32Ty(BB->getContext()); @@ -526,10 +529,13 @@ Value *Val0 = getRandomVectorValue(); Value *Val1 = getRandomValue(Val0->getType()->getScalarType()); - Value *V = InsertElementInst::Create(Val0, Val1, - ConstantInt::get(Type::getInt32Ty(BB->getContext()), - getRandom() % cast(Val0->getType())->getNumElements()), - "I", BB->getTerminator()); + Value *V = InsertElementInst::Create( + Val0, Val1, + ConstantInt::get( + Type::getInt32Ty(BB->getContext()), + getRandom() % + cast(Val0->getType())->getNumElements()), + "I", BB->getTerminator()); return PT->push_back(V); } }; @@ -545,7 +551,7 @@ // Handle vector casts vectors. if (VTy->isVectorTy()) { - VectorType *VecTy = cast(VTy); + auto *VecTy = cast(VTy); DestTy = pickVectorType(VecTy->getNumElements()); }