]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Check is_single_const in intersect_with_plats
authorMartin Jambor <mjambor@suse.cz>
Thu, 17 May 2018 12:18:06 +0000 (14:18 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Thu, 17 May 2018 12:18:06 +0000 (14:18 +0200)
2018-05-17  Martin Jambor  <mjambor@suse.cz>

Backport from mainline
2018-05-11  Martin Jambor  <mjambor@suse.cz>

PR ipa/85655
* ipa-cp.c (intersect_with_plats): Check that the lattice contains
single const.

From-SVN: r260319

gcc/ChangeLog
gcc/ipa-cp.c

index 2009dc041d2633a572f729974a3218500e0be25e..03be2a8c57ebd657736f81ffe77329a1b5c564a6 100644 (file)
@@ -1,3 +1,12 @@
+2018-05-17  Martin Jambor  <mjambor@suse.cz>
+
+       Backport from mainline
+       2018-05-11  Martin Jambor  <mjambor@suse.cz>
+
+       PR ipa/85655
+       * ipa-cp.c (intersect_with_plats): Check that the lattice contains
+       single const.
+
 2018-05-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        PR target/83687
index caa346f7016b06c2f294ae9d5f6a6f201824f8dc..b09167fc99f2a55db3376bd09b86f42532a38e30 100644 (file)
@@ -3703,7 +3703,9 @@ intersect_with_plats (struct ipcp_param_lattices *plats,
          if (aglat->offset - offset == item->offset)
            {
              gcc_checking_assert (item->value);
-             if (values_equal_for_ipcp_p (item->value, aglat->values->value))
+             if (aglat->is_single_const ()
+                 && values_equal_for_ipcp_p (item->value,
+                                             aglat->values->value))
                found = true;
              break;
            }