public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Aldy Hernandez <aldyh@redhat.com>
To: gcc-patches@gcc.gnu.org
Subject: [PUSHED 5/8] Adjust vrp_evaluate_conditional for irange API.
Date: Tue,  4 Aug 2020 08:34:45 +0200	[thread overview]
Message-ID: <20200804063441.517123-6-aldyh@redhat.com> (raw)
In-Reply-To: <20200804063441.517123-1-aldyh@redhat.com>

VR_RANGE of [-INF,+INF] is canonicalized to VARYING at creation.
That is why the test now becomes varying_p().

gcc/ChangeLog:

	* vr-values.c (simplify_using_ranges::vrp_evaluate_conditional): Adjust
	for irange API.
---
 gcc/vr-values.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/gcc/vr-values.c b/gcc/vr-values.c
index 1190fa96453..90ba8fca246 100644
--- a/gcc/vr-values.c
+++ b/gcc/vr-values.c
@@ -2495,11 +2495,7 @@ simplify_using_ranges::vrp_evaluate_conditional (tree_code code, tree op0,
       tree type = TREE_TYPE (op0);
       const value_range_equiv *vr0 = get_value_range (op0);
 
-      if (vr0->kind () == VR_RANGE
-	  && INTEGRAL_TYPE_P (type)
-	  && vrp_val_is_min (vr0->min ())
-	  && vrp_val_is_max (vr0->max ())
-	  && is_gimple_min_invariant (op1))
+      if (vr0->varying_p () && INTEGRAL_TYPE_P (type))
 	{
 	  location_t location;
 
-- 
2.26.2


  parent reply	other threads:[~2020-08-04  6:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-04  6:34 [PUSHED 0/8] irange API adjustments for various files Aldy Hernandez
2020-08-04  6:34 ` [PUSHED 1/8] Remove ad-hoc range canonicalization from determine_block_size Aldy Hernandez
2020-08-04  6:34 ` [PUSHED 2/8] Adjust expr_not_equal_to to use irange API Aldy Hernandez
2020-08-04  6:52   ` Richard Biener
2020-08-04  9:16     ` Aldy Hernandez
2020-08-04  6:34 ` [PUSHED 3/8] Adjust get_range_info to use the base irange class Aldy Hernandez
2020-08-04  6:34 ` [PUSHED 4/8] Adjust op_with_boolean_value_range_p for irange API Aldy Hernandez
2020-08-04  6:55   ` Richard Biener
2020-08-04  9:45     ` Aldy Hernandez
2020-08-04  6:34 ` Aldy Hernandez [this message]
2020-08-04  6:55   ` [PUSHED 5/8] Adjust vrp_evaluate_conditional " Richard Biener
2020-08-04  9:23     ` Aldy Hernandez
2020-08-04  6:34 ` [PUSHED 6/8] Use irange API in test_for_singularity Aldy Hernandez
2020-08-04  6:58   ` Richard Biener
2020-08-04  9:55     ` Aldy Hernandez
2020-08-04  6:34 ` [PUSHED 7/8] Adjust simplify_conversion_using_ranges for irange API Aldy Hernandez
2020-08-04  6:34 ` [PUSHED 8/8] Adjust two_valued_val_range_p " Aldy Hernandez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200804063441.517123-6-aldyh@redhat.com \
    --to=aldyh@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).