aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-affine.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-affine.h')
-rw-r--r--gcc/tree-affine.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/tree-affine.h b/gcc/tree-affine.h
index be64ede..731c04fc 100644
--- a/gcc/tree-affine.h
+++ b/gcc/tree-affine.h
@@ -80,3 +80,16 @@ bool aff_comb_cannot_overlap_p (aff_tree *, double_int, double_int);
/* Debugging functions. */
void debug_aff (aff_tree *);
+
+/* Return true if AFF is actually ZERO. */
+static inline bool
+aff_combination_zero_p (aff_tree *aff)
+{
+ if (!aff)
+ return true;
+
+ if (aff->n == 0 && aff->offset.is_zero ())
+ return true;
+
+ return false;
+}