]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Allow bitmask intersection to process unknown masks.
authorAndrew MacLeod <amacleod@redhat.com>
Wed, 14 May 2025 15:13:15 +0000 (11:13 -0400)
committerAndrew MacLeod <amacleod@redhat.com>
Thu, 15 May 2025 17:07:34 +0000 (13:07 -0400)
bitmask_intersection should not return immediately if the current mask is
unknown.  Unknown may mean its the default for a range, and this may
interact in intersting ways with the other bitmask.

PR tree-optimization/116546
* value-range.cc (irange::intersect_bitmask): Allow unknown
bitmasks to be processed.

gcc/value-range.cc

index 64d10f41168b2e2a496ebe98d2cf59d368ed69a9..ed3760fa6ff64e51b80df2c3c75dc975ab034fe7 100644 (file)
@@ -2434,7 +2434,7 @@ irange::intersect_bitmask (const irange &r)
 {
   gcc_checking_assert (!undefined_p () && !r.undefined_p ());
 
-  if (r.m_bitmask.unknown_p () || m_bitmask == r.m_bitmask)
+  if (m_bitmask == r.m_bitmask)
     return false;
 
   irange_bitmask bm = get_bitmask ();