]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: alpha.h (alpha_expand_mov): Return false if force_const_mem returns NULL_RTX.
authorUros Bizjak <uros@gcc.gnu.org>
Sat, 28 Feb 2009 17:22:52 +0000 (18:22 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Sat, 28 Feb 2009 17:22:52 +0000 (18:22 +0100)
Backport from mainline:
2009-02-26  Uros Bizjak  <ubizjak@gmail.com>

* config/alpha/alpha.h (alpha_expand_mov): Return false if
force_const_mem returns NULL_RTX.

From-SVN: r144487

gcc/ChangeLog
gcc/config/alpha/alpha.c

index 9a0a119505ffa83ebd12819e519e5906cd148150..9fb63146febe42a257ad6ed10a030b7bc4b67667 100644 (file)
@@ -1,3 +1,11 @@
+2009-02-28  Uros Bizjak  <ubizjak@gmail.com>
+
+       Backport from mainline:
+       2009-02-26  Uros Bizjak  <ubizjak@gmail.com>
+
+       * config/alpha/alpha.h (alpha_expand_mov): Return false if
+       force_const_mem returns NULL_RTX.
+
 2009-02-26  Uros Bizjak  <ubizjak@gmail.com>
 
        Backport from mainline:
 
        Backport from mainline
        2009-02-05  Daniel Berlin  <dberlin@dberlin.org>
-           Richard Guenther  <rguenther@suse.de>
+                   Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/39100
        * tree-ssa-structalias.c (do_ds_constraint): Actually do what the
index 9a5341eac89e3f6dc03e48687794bd8b20a22267..e327cd44a53d241105d4fcff8a20ef651470e706 100644 (file)
@@ -2123,6 +2123,8 @@ alpha_split_const_mov (enum machine_mode mode, rtx *operands)
 bool
 alpha_expand_mov (enum machine_mode mode, rtx *operands)
 {
+  rtx tmp;
+
   /* If the output is not a register, the input must be.  */
   if (GET_CODE (operands[0]) == MEM
       && ! reg_or_0_operand (operands[1], mode))
@@ -2131,8 +2133,6 @@ alpha_expand_mov (enum machine_mode mode, rtx *operands)
   /* Allow legitimize_address to perform some simplifications.  */
   if (mode == Pmode && symbolic_operand (operands[1], mode))
     {
-      rtx tmp;
-
       tmp = alpha_legitimize_address (operands[1], operands[0], mode);
       if (tmp)
        {
@@ -2157,14 +2157,18 @@ alpha_expand_mov (enum machine_mode mode, rtx *operands)
     }
 
   /* Otherwise we've nothing left but to drop the thing to memory.  */
-  operands[1] = force_const_mem (mode, operands[1]);
+  tmp = force_const_mem (mode, operands[1]);
+
+  if (tmp == NULL_RTX)
+    return false;
+
   if (reload_in_progress)
     {
-      emit_move_insn (operands[0], XEXP (operands[1], 0));
-      operands[1] = replace_equiv_address (operands[1], operands[0]);
+      emit_move_insn (operands[0], XEXP (tmp, 0));
+      operands[1] = replace_equiv_address (tmp, operands[0]);
     }
   else
-    operands[1] = validize_mem (operands[1]);
+    operands[1] = validize_mem (tmp);
   return false;
 }