File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
llvm/include/llvm/Analysis Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -33,15 +33,10 @@ template <typename Predicate> struct cst_pred_ty : public Predicate {
3333};
3434
3535struct is_zero {
36- template <typename ITy> bool match (ITy *S) {
37- assert ((isa<SCEVCouldNotCompute>(S) || !S->getType ()->isVectorTy ()) &&
38- " no vector types expected from SCEVs" );
39- auto *C = dyn_cast<SCEVConstant>(S);
40- return C && C->getValue ()->isNullValue ();
41- }
36+ bool isValue (const APInt &C) { return C.isZero (); }
4237};
43- // / Match any null constant .
44- inline is_zero m_scev_Zero () { return is_zero (); }
38+ // / Match an integer 0 .
39+ inline cst_pred_ty< is_zero> m_scev_Zero () { return cst_pred_ty< is_zero> (); }
4540
4641struct is_one {
4742 bool isValue (const APInt &C) { return C.isOne (); }
You can’t perform that action at this time.
0 commit comments