gcc/
Backport from mainline:
2011-12-05 Kazu Hirata <kazu@codesourcery.com>
PR target/51408
* config/arm/arm.md (*minmax_arithsi): Always require the else
clause in the MINUS case.
testsuite/
Backport from mainline:
2011-12-05 Kazu Hirata <kazu@codesourcery.com>
PR target/51408
* gcc.dg/pr51408.c: New.
From-SVN: r182153
+2011-12-09 Kazu Hirata <kazu@codesourcery.com>
+
+ Backport from mainline:
+
+ 2011-12-05 Kazu Hirata <kazu@codesourcery.com>
+
+ PR target/51408
+ * config/arm/arm.md (*minmax_arithsi): Always require the else
+ clause in the MINUS case.
+
2011-12-08 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
bool need_else;
if (which_alternative != 0 || operands[3] != const0_rtx
- || (code != PLUS && code != MINUS && code != IOR && code != XOR))
+ || (code != PLUS && code != IOR && code != XOR))
need_else = true;
else
need_else = false;
+2011-12-09 Kazu Hirata <kazu@codesourcery.com>
+
+ Backport from mainline:
+
+ 2011-12-05 Kazu Hirata <kazu@codesourcery.com>
+
+ PR target/51408
+ * gcc.dg/pr51408.c: New.
+
2011-12-08 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
--- /dev/null
+/* This testcase used to fail because of a bug in
+ arm.md:*minmax_arithsi. */
+
+/* { dg-do run } */
+/* { dg-options "-O1" } */
+
+extern void abort (void);
+
+int __attribute__((noinline))
+foo (int a, int b)
+{
+ int max = (b > 0) ? b : 0;
+ return max - a;
+}
+
+int
+main (void)
+{
+ if (foo (3, -1) != -3)
+ abort ();
+ return 0;
+}