@@ -5952,44 +5952,23 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
5952
5952
break ;
5953
5953
}
5954
5954
case Intrinsic::lrint:
5955
- case Intrinsic::llrint: {
5956
- Type *ValTy = Call.getArgOperand (0 )->getType ();
5957
- Type *ResultTy = Call.getType ();
5958
- Check (
5959
- ValTy->isFPOrFPVectorTy () && ResultTy->isIntOrIntVectorTy (),
5960
- " llvm.lrint, llvm.llrint: argument must be floating-point or vector "
5961
- " of floating-points, and result must be integer or vector of integers" ,
5962
- &Call);
5963
- Check (ValTy->isVectorTy () == ResultTy->isVectorTy (),
5964
- " llvm.lrint, llvm.llrint: argument and result disagree on vector use" ,
5965
- &Call);
5966
- if (ValTy->isVectorTy ()) {
5967
- Check (cast<VectorType>(ValTy)->getElementCount () ==
5968
- cast<VectorType>(ResultTy)->getElementCount (),
5969
- " llvm.lrint, llvm.llrint: argument must be same length as result" ,
5970
- &Call);
5971
- }
5972
- break ;
5973
- }
5955
+ case Intrinsic::llrint:
5974
5956
case Intrinsic::lround:
5975
5957
case Intrinsic::llround: {
5976
5958
Type *ValTy = Call.getArgOperand (0 )->getType ();
5977
5959
Type *ResultTy = Call.getType ();
5978
5960
auto *VTy = dyn_cast<VectorType>(ValTy);
5979
5961
auto *RTy = dyn_cast<VectorType>(ResultTy);
5980
- Check (
5981
- ValTy->isFPOrFPVectorTy () && ResultTy->isIntOrIntVectorTy (),
5982
- " llvm.lround, llvm.llround: argument must be floating-point or vector "
5983
- " of floating-points, and result must be integer or vector of integers" ,
5984
- &Call);
5985
- Check (
5986
- ValTy->isVectorTy () == ResultTy->isVectorTy (),
5987
- " llvm.lround, llvm.llround: argument and result disagree on vector use" ,
5988
- &Call);
5962
+ Check (ValTy->isFPOrFPVectorTy () && ResultTy->isIntOrIntVectorTy (),
5963
+ ExpectedName + " : argument must be floating-point or vector "
5964
+ " of floating-points, and result must be integer or "
5965
+ " vector of integers" ,
5966
+ &Call);
5967
+ Check (ValTy->isVectorTy () == ResultTy->isVectorTy (),
5968
+ ExpectedName + " : argument and result disagree on vector use" , &Call);
5989
5969
if (VTy) {
5990
5970
Check (VTy->getElementCount () == RTy->getElementCount (),
5991
- " llvm.lround, llvm.llround: argument must be same length as result" ,
5992
- &Call);
5971
+ ExpectedName + " : argument must be same length as result" , &Call);
5993
5972
}
5994
5973
break ;
5995
5974
}
0 commit comments