@@ -12321,6 +12321,7 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1)
optimization and for > or <= by setting all the low
order N bits in the comparison constant. */
if (CONST_INT_P (XEXP (op0, 1))
+ && const_op >= 0
&& INTVAL (XEXP (op0, 1)) > 0
&& INTVAL (XEXP (op0, 1)) < HOST_BITS_PER_WIDE_INT
&& mode_width <= HOST_BITS_PER_WIDE_INT
new file mode 100644
@@ -0,0 +1,13 @@
+int bar (void);
+
+void
+foo (unsigned long long a, int b)
+{
+ int i;
+
+ for (a = -12; a >= 10; a = bar ())
+ break;
+
+ if (i == bar () || bar () >= a)
+ bar ();
+}