aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/ifcvt.c4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr83361.c40
4 files changed, 54 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b1a689fe..8c9fe1b 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2017-12-11 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR rtl-optimization/83361
+ * ifcvt.c (if_convert): Call fixup_partitions.
+
2017-12-11 Will Schmidt <will_schmidt@vnet.ibm.com>
* config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 91360d8..eb3da68 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -5446,6 +5446,10 @@ if_convert (bool after_combine)
if (optimize == 1)
df_remove_problem (df_live);
+ /* Some non-cold blocks may now be only reachable from cold blocks.
+ Fix that up. */
+ fixup_partitions ();
+
checking_verify_flow_info ();
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index dced5e7..3c2f0d2 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2017-12-11 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR rtl-optimization/83361
+ * gcc.dg/pr83361.c: New testcase.
+
2017-12-11 Will Schmidt <will_schmidt@vnet.ibm.com>
* gcc.target/powerpc/fold-vec-splat-misc-invalid.c: New.
diff --git a/gcc/testsuite/gcc.dg/pr83361.c b/gcc/testsuite/gcc.dg/pr83361.c
new file mode 100644
index 0000000..2a6f807
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr83361.c
@@ -0,0 +1,40 @@
+/* PR rtl-optimization/83361 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -freorder-blocks-and-partition" } */
+
+#include <limits.h>
+
+int yz;
+
+void
+tq (int z3)
+{
+ unsigned long long int n8 = (unsigned long long int)INT_MAX + 1;
+ int *ey = &yz;
+
+ if (yz == 0)
+ {
+ int bc;
+
+ yz = 1;
+ while (yz != 0)
+ {
+ *ey *= bc;
+ n8 = !!(1 / ((unsigned long long int)yz == n8));
+ ey = &z3;
+ }
+
+ while (z3 != 0)
+ {
+ }
+ }
+
+ z3 = (n8 != 0) && (*ey != 0);
+ z3 = yz / z3;
+ if (z3 < 0)
+ {
+ if (yz != 0)
+ yz = 0;
+ yz /= 0;
+ }
+}