[NFC] Use VectorType::isScalable to align with ongoing VectorType refactor.

This commit is contained in:
Huihui Zhang 2020-04-12 15:05:37 -07:00
parent 38c271f6f9
commit 4bde7c5986
2 changed files with 2 additions and 2 deletions

View File

@ -534,7 +534,7 @@ bool BasicAAResult::DecomposeGEPExpression(const Value *V,
// Don't attempt to analyze GEPs if index scale is not a compile-time
// constant.
Type *SrcEleTy = GEPOp->getSourceElementType();
if (SrcEleTy->isVectorTy() && SrcEleTy->getVectorIsScalable()) {
if (SrcEleTy->isVectorTy() && cast<VectorType>(SrcEleTy)->isScalable()) {
Decomposed.Base = V;
Decomposed.HasCompileTimeConstantScale = false;
return false;

View File

@ -12,7 +12,7 @@ namespace VNCoercion {
static bool isFirstClassAggregateOrScalableType(Type *Ty) {
return Ty->isStructTy() || Ty->isArrayTy() ||
(Ty->isVectorTy() && Ty->getVectorIsScalable());
(Ty->isVectorTy() && cast<VectorType>(Ty)->isScalable());
}
/// Return true if coerceAvailableValueToLoadType will succeed.