Message ID | 20240516100118.938171-1-aldyh@redhat.com |
---|---|
State | New |
Headers | show |
Series | [COMMITTED] Use a boolean type when folding conditionals in simplify_using_ranges. | expand |
diff --git a/gcc/vr-values.cc b/gcc/vr-values.cc index 0572bf6c8c7..e6ea9592574 100644 --- a/gcc/vr-values.cc +++ b/gcc/vr-values.cc @@ -316,10 +316,9 @@ simplify_using_ranges::fold_cond_with_ops (enum tree_code code, || !query->range_of_expr (r1, op1, s)) return NULL_TREE; - tree type = TREE_TYPE (op0); int_range<1> res; range_op_handler handler (code); - if (handler && handler.fold_range (res, type, r0, r1)) + if (handler && handler.fold_range (res, boolean_type_node, r0, r1)) { if (res == range_true ()) return boolean_true_node;