lra-constraints.c (inherit_in_ebb): Handle calls with multiple return values.
authorIlya Enkovich <ilya.enkovich@intel.com>
Fri, 3 Oct 2014 08:43:21 +0000 (08:43 +0000)
committerKirill Yukhin <kyukhin@gcc.gnu.org>
Fri, 3 Oct 2014 08:43:21 +0000 (08:43 +0000)
gcc/
* lra-constraints.c (inherit_in_ebb): Handle calls with
multiple return values.
* caller-save.c (save_call_clobbered_regs): Likewise.

From-SVN: r215839

gcc/ChangeLog
gcc/caller-save.c
gcc/lra-constraints.c

index 4a7366d4e909a2bf75511e6a582fac79baa6c402..884495f4ab2cac21c29472771692bef4ca1fd32e 100644 (file)
@@ -1,3 +1,9 @@
+2014-10-03  Ilya Enkovich  <ilya.enkovich@intel.com>
+
+       * lra-constraints.c (inherit_in_ebb): Handle calls with
+       multiple return values.
+       * caller-save.c (save_call_clobbered_regs): Likewise.
+
 2014-10-03  Jakub Jelinek  <jakub@redhat.com>
 
        * tree-vect-data-refs.c (vect_permute_load_chain,
index 11df2ecc17179fdba2e84f989c9ef644a420f49b..e28facba7bef07df9233d7b778e25529a6fcab54 100644 (file)
@@ -879,8 +879,13 @@ save_call_clobbered_regs (void)
                  if (GET_CODE (pat) == PARALLEL)
                    pat = XVECEXP (pat, 0, 0);
                  dest = SET_DEST (pat);
-                 newpat = gen_rtx_SET (VOIDmode, cheap, copy_rtx (dest));
-                 chain = insert_one_insn (chain, 0, -1, newpat);
+                 /* For multiple return values dest is PARALLEL.
+                    Currently we handle only single return value case.  */
+                 if (REG_P (dest))
+                   {
+                     newpat = gen_rtx_SET (VOIDmode, cheap, copy_rtx (dest));
+                     chain = insert_one_insn (chain, 0, -1, newpat);
+                   }
                }
            }
           last = chain;
index 5f6839968d65ae928f34f66769a270aa1707864e..f1642f3b390cad715c6f765c9f114fc65a60fb24 100644 (file)
@@ -5348,16 +5348,21 @@ inherit_in_ebb (rtx_insn *head, rtx_insn *tail)
                  if (GET_CODE (pat) == PARALLEL)
                    pat = XVECEXP (pat, 0, 0);
                  dest = SET_DEST (pat);
-                 start_sequence ();
-                 emit_move_insn (cheap, copy_rtx (dest));
-                 restore = get_insns ();
-                 end_sequence ();
-                 lra_process_new_insns (curr_insn, NULL, restore,
-                                        "Inserting call parameter restore");
-                 /* We don't need to save/restore of the pseudo from
-                    this call.  */
-                 usage_insns[regno].calls_num = calls_num;
-                 bitmap_set_bit (&check_only_regs, regno);
+                 /* For multiple return values dest is PARALLEL.
+                    Currently we handle only single return value case.  */
+                 if (REG_P (dest))
+                   {
+                     start_sequence ();
+                     emit_move_insn (cheap, copy_rtx (dest));
+                     restore = get_insns ();
+                     end_sequence ();
+                     lra_process_new_insns (curr_insn, NULL, restore,
+                                            "Inserting call parameter restore");
+                     /* We don't need to save/restore of the pseudo from
+                        this call.      */
+                     usage_insns[regno].calls_num = calls_num;
+                     bitmap_set_bit (&check_only_regs, regno);
+                   }
                }
            }
          to_inherit_num = 0;