return computed_value_Cmp_Confirm(cmp, left, right, relation);
}
+/**
+ * some people want to call compute_cmp directly, in this case we have to
+ * test the constant folding flag again
+ */
+static ir_tarval *compute_cmp_ext(const ir_node *cmp)
+{
+ if (!get_opt_constant_folding())
+ return tarval_bad;
+ return compute_cmp(cmp);
+}
+
/**
* Return the value of a Cmp.
*
if (ts == tarval_bad && is_Cmp(sel)) {
/* try again with a direct call to compute_cmp, as we don't care
* about the MODEB_LOWERED flag here */
- ts = compute_cmp(sel);
+ ts = compute_cmp_ext(sel);
}
/* Mux(true, f, t) == t */
if (ta == tarval_bad && is_Cmp(a)) {
/* try again with a direct call to compute_cmp, as we don't care
* about the MODEB_LOWERED flag here */
- ta = compute_cmp(a);
+ ta = compute_cmp_ext(a);
}
if (ta != tarval_bad && get_irn_mode(a) == mode_b) {