i386.c (ix86_expand_call): Avoid nested PARALLEL in returned call value.
authorIlya Enkovich <ilya.enkovich@intel.com>
Fri, 3 Apr 2015 08:51:26 +0000 (08:51 +0000)
committerIlya Enkovich <ienkovich@gcc.gnu.org>
Fri, 3 Apr 2015 08:51:26 +0000 (08:51 +0000)
* config/i386/i386.c (ix86_expand_call): Avoid nested
PARALLEL in returned call value.

From-SVN: r221851

gcc/ChangeLog
gcc/config/i386/i386.c

index a11ec1c..b37e15d 100644 (file)
@@ -1,5 +1,10 @@
 2015-04-02  Ilya Enkovich  <ilya.enkovich@intel.com>
 
+       * config/i386/i386.c (ix86_expand_call): Avoid nested
+       PARALLEL in returned call value.
+
+2015-04-02  Ilya Enkovich  <ilya.enkovich@intel.com>
+
        * lto-cgraph.c (input_cgraph_1): Always link instrumented
        assembler name with original one.
 
index d8d9983..02b5103 100644 (file)
@@ -25624,8 +25624,19 @@ ix86_expand_call (rtx retval, rtx fnaddr, rtx callarg1,
        {
          rtx b0 = gen_rtx_REG (BND64mode, FIRST_BND_REG);
          rtx b1 = gen_rtx_REG (BND64mode, FIRST_BND_REG + 1);
-         retval = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (3, retval, b0, b1));
-         chkp_put_regs_to_expr_list (retval);
+         if (GET_CODE (retval) == PARALLEL)
+           {
+             b0 = gen_rtx_EXPR_LIST (VOIDmode, b0, const0_rtx);
+             b1 = gen_rtx_EXPR_LIST (VOIDmode, b1, const0_rtx);
+             rtx par = gen_rtx_PARALLEL (VOIDmode, gen_rtvec (2, b0, b1));
+             retval = chkp_join_splitted_slot (retval, par);
+           }
+         else
+           {
+             retval = gen_rtx_PARALLEL (VOIDmode,
+                                        gen_rtvec (3, retval, b0, b1));
+             chkp_put_regs_to_expr_list (retval);
+           }
        }
 
       call = gen_rtx_SET (VOIDmode, retval, call);