@@ -1546,11 +1546,9 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
15461546 }
15471547
15481548 static bool isAArch64SVCount (Type *Ty) {
1549- if (!isa<TargetExtType>(Ty))
1550- return false ;
1551-
1552- TargetExtType *TTy = cast<TargetExtType>(Ty);
1553- return TTy->getName () == " aarch64.svcount" ;
1549+ if (TargetExtType* TTy = dyn_cast<TargetExtType>(Ty))
1550+ return TTy->getName () == " aarch64.svcount" ;
1551+ return false ;
15541552 }
15551553
15561554 // This is intended to match the "AArch64 Predicate-as-Counter Type" (aka
@@ -1563,10 +1561,6 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
15631561 return Ty->isScalableTy () && !isa<VectorType>(Ty);
15641562 }
15651563
1566- static bool isScalableNonVectorType (Instruction *I) {
1567- return isScalableNonVectorType (I->getType ());
1568- }
1569-
15701564 void materializeChecks () {
15711565#ifndef NDEBUG
15721566 // For assert below.
@@ -7007,7 +7001,7 @@ struct MemorySanitizerVisitor : public InstVisitor<MemorySanitizerVisitor> {
70077001 // an extra "select". This results in much more compact IR.
70087002 // Sa = select Sb, poisoned, (select b, Sc, Sd)
70097003 Sa1 = getPoisonedShadow (getShadowTy (I.getType ()));
7010- } else if (isScalableNonVectorType (&I )) {
7004+ } else if (isScalableNonVectorType (I. getType () )) {
70117005 // This is intended to handle target("aarch64.svcount"), which can't be
70127006 // handled in the else branch because of incompatibility with CreateXor
70137007 // ("The supported LLVM operations on this type are limited to load,
0 commit comments