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 {
33
33
};
34
34
35
35
struct 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 (); }
42
37
};
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> (); }
45
40
46
41
struct is_one {
47
42
bool isValue (const APInt &C) { return C.isOne (); }
You can’t perform that action at this time.
0 commit comments