+/**
+ * returns whether the cmp evaluates to true or false according to vrp
+ * information , or can't be evaluated!
+ * 1: true, 0: false, -1: can't evaluate
+ *
+ * @param relation the compare mode of the Compare
+ * @param left the left node
+ * @param right the right node
+ */
+static int eval_cmp_vrp(ir_relation relation, ir_node *left, ir_node *right)
+{
+ ir_relation cmp_result = vrp_cmp(left, right);
+ /* does the compare evaluate to true? */
+ if (cmp_result == ir_relation_false)
+ return -1;
+
+ if ((cmp_result & relation) != cmp_result) {
+ if ((cmp_result & relation) != 0) {
+ return -1;
+ }
+ return 0;
+ }