PR target/49238
* config/sh/sh.c (expand_cbranchdi4): Use a scratch register if
needed when original operands are used for msw_skip comparison.
* gcc.c-torture/compile/pr49238.c: New.
From-SVN: r174794
+2011-06-08 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ Backport from mainline
+ 2011-06-01 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ PR target/49238
+ * config/sh/sh.c (expand_cbranchdi4): Use a scratch register if
+ needed when original operands are used for msw_skip comparison.
+
2011-06-05 Eric Botcazou <ebotcazou@adacore.com>
* config/sparc/sparc.c (output_return): Fix thinko in the output of an
{
operands[1] = op1h;
operands[2] = op2h;
+ if (reload_completed
+ && ! arith_reg_or_0_operand (op2h, SImode)
+ && (true_regnum (op1h) || (comparison != EQ && comparison != NE)))
+ {
+ emit_move_insn (scratch, operands[2]);
+ operands[2] = scratch;
+ }
}
operands[3] = skip_label = gen_label_rtx ();
+2011-06-08 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ Backport from mainline
+ 2011-06-01 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ PR target/49238
+ * gcc.c-torture/compile/pr49238.c: New.
+
2011-06-05 Kaz Kojima <kkojima@gcc.gnu.org>
Backport from mainline
--- /dev/null
+/* PR target/49238 */
+extern int bar (void);
+
+void
+foo (unsigned long long a, int b)
+{
+ int i;
+
+ if (b)
+ for (a = -12; a >= 10; a = bar ())
+ break;
+ else
+ return;
+
+ for (i = 0; i < 10; i += 10)
+ if ((i == bar ()) | (bar () >= a))
+ bar ();
+}