]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/38016 (-fno-ivopts exposes CRIS port bug, more with -fno-gcse)
authorHans-Peter Nilsson <hp@axis.com>
Wed, 5 Nov 2008 18:04:36 +0000 (18:04 +0000)
committerHans-Peter Nilsson <hp@gcc.gnu.org>
Wed, 5 Nov 2008 18:04:36 +0000 (18:04 +0000)
PR target/38016
* config/cris/cris.c (cris_order_for_addsi3): Test for !REG_P, not
just MEM_P.

From-SVN: r141614

gcc/ChangeLog
gcc/config/cris/cris.c

index 551175064f1ce611111b543f30b6286e26f20d5b..433cdace945c19c2a3e7ec203f57e8e1afd10f1d 100644 (file)
@@ -1,3 +1,9 @@
+2008-11-05  Hans-Peter Nilsson  <hp@axis.com>
+
+       PR target/38016
+       * config/cris/cris.c (cris_order_for_addsi3): Test for !REG_P, not
+       just MEM_P.
+
 2008-11-05  Martin Jambor  <mjambor@suse.cz>
 
        PR middle-end/37861
index 88d89993a9e24e8fc3cef13f9477b0076710c06c..75e2e187cf7c61eff84cb0525690d423245da6ab 100644 (file)
@@ -3565,14 +3565,15 @@ cris_expand_pic_call_address (rtx *opp)
 }
 
 /* Make sure operands are in the right order for an addsi3 insn as
-   generated by a define_split.  A MEM as the first operand isn't
-   recognized by addsi3 after reload.  OPERANDS contains the operands,
-   with the first at OPERANDS[N] and the second at OPERANDS[N+1].  */
+   generated by a define_split.  Nothing but REG_P as the first
+   operand is recognized by addsi3 after reload.  OPERANDS contains
+   the operands, with the first at OPERANDS[N] and the second at
+   OPERANDS[N+1].  */
 
 void
 cris_order_for_addsi3 (rtx *operands, int n)
 {
-  if (MEM_P (operands[n]))
+  if (!REG_P (operands[n]))
     {
       rtx tem = operands[n];
       operands[n] = operands[n + 1];