https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108357

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
The CCP hunk causes a condition to be optimized away which then results in
different jump threading and different VRP.  I didn't analyze further, but the
first difference is good:

@@ -253,31 +256,25 @@
   _9 = (short int) _8;
   _4 = (int) _9;
   b = 0;
-  if (_9 != 0)
-    goto <bb 3>; [67.00%]
-  else
-    goto <bb 6>; [33.00%]
-
-  <bb 3> [local count: 719407025]:
   _14 = (int) _9;
   if (_14 > 1)
-    goto <bb 5>; [50.00%]
-  else
     goto <bb 4>; [50.00%]
+  else
+    goto <bb 3>; [50.00%]

-  <bb 4> [local count: 359703512]:
+  <bb 3> [local count: 359703512]:

-  <bb 5> [local count: 719407025]:
-  # iftmp.3_15 = PHI <1(3), 0(4)>
+  <bb 4> [local count: 719407025]:
+  # iftmp.3_15 = PHI <1(2), 0(3)>
   if (_14 != iftmp.3_15)
-    goto <bb 7>; [66.00%]
+    goto <bb 6>; [66.00%]
   else
-    goto <bb 6>; [34.00%]
+    goto <bb 5>; [34.00%]

-  <bb 6> [local count: 598933192]:
+  <bb 5> [local count: 598933192]:
   foo ();

-  <bb 7> [local count: 1073741825]:
+  <bb 6> [local count: 1073741825]:
   return 0;

Reply via email to