aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2022-02-16 09:01:47 -0500
committerAndrew MacLeod <amacleod@redhat.com>2022-02-16 13:45:10 -0500
commitfe581e63431bb1115d8a4945ba457f05e33dc6bb (patch)
treee51e74741d248d1be11bfd2d86339f45664801e8
parentc19f317a78c0e4c1b51d0e5a8e4c0a3b985b7a8e (diff)
downloadgcc-fe581e63431bb1115d8a4945ba457f05e33dc6bb.zip
gcc-fe581e63431bb1115d8a4945ba457f05e33dc6bb.tar.gz
gcc-fe581e63431bb1115d8a4945ba457f05e33dc6bb.tar.bz2
Use range_compatible_p in condexpr_adjust
* gimple-range-gori.cc (gori_compute::condexpr_adjust): Use range_compatible_p instead of direct type comparison.
-rw-r--r--gcc/gimple-range-gori.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/gimple-range-gori.cc b/gcc/gimple-range-gori.cc
index 258da6e..311214c 100644
--- a/gcc/gimple-range-gori.cc
+++ b/gcc/gimple-range-gori.cc
@@ -1322,7 +1322,7 @@ gori_compute::condexpr_adjust (irange &r1, irange &r2, gimple *, tree cond,
if (!COMPARISON_CLASS_P (cond))
return false;
tree type = TREE_TYPE (TREE_OPERAND (cond, 0));
- if (type != TREE_TYPE (TREE_OPERAND (cond, 1)))
+ if (!range_compatible_p (type, TREE_TYPE (TREE_OPERAND (cond, 1))))
return false;
range_operator *hand = range_op_handler (TREE_CODE (cond), type);
if (!hand)