re PR middle-end/78468 (libgomp.c/reduction-10.c and many more FAIL)
authorEric Botcazou <ebotcazou@adacore.com>
Thu, 2 Feb 2017 12:39:09 +0000 (12:39 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Thu, 2 Feb 2017 12:39:09 +0000 (12:39 +0000)
PR middle-end/78468
* emit-rtl.c (init_emit): Add ??? comment for problematic alignment
settings of the virtual registers.

Revert again
2016-08-23  Dominik Vogt  <vogt@linux.vnet.ibm.com>

* explow.c (get_dynamic_stack_size): Take known alignment of stack
pointer + STACK_DYNAMIC_OFFSET into account when calculating the size
needed.

From-SVN: r245124

gcc/ChangeLog
gcc/emit-rtl.c
gcc/explow.c

index cc3e98bf60518651b55a1bbcb354f9ec2ce891db..7a11db8b0d7592146ec2d017882e8264e683e278 100644 (file)
@@ -1,3 +1,16 @@
+2017-02-02  Eric Botcazou  <ebotcazou@adacore.com>
+
+       PR middle-end/78468
+       * emit-rtl.c (init_emit): Add ??? comment for problematic alignment
+       settings of the virtual registers.
+
+       Revert again
+       2016-08-23  Dominik Vogt  <vogt@linux.vnet.ibm.com>
+
+       * explow.c (get_dynamic_stack_size): Take known alignment of stack
+       pointer + STACK_DYNAMIC_OFFSET into account when calculating the size
+       needed.
+
 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
 
        * config/s390/vx-builtins.md ("vec_ceil", "vec_floor")
index 0b9552b3541e3b5c5336af5c61b642c66eb154ab..0d25d4ec17ec7aea4696d3553b094c3c60096d03 100644 (file)
@@ -5725,10 +5725,13 @@ init_emit (void)
   REGNO_POINTER_ALIGN (HARD_FRAME_POINTER_REGNUM) = STACK_BOUNDARY;
   REGNO_POINTER_ALIGN (ARG_POINTER_REGNUM) = STACK_BOUNDARY;
 
+  /* ??? These are problematic (for example, 3 out of 4 are wrong on
+     32-bit SPARC and cannot be all fixed because of the ABI).  */
   REGNO_POINTER_ALIGN (VIRTUAL_INCOMING_ARGS_REGNUM) = STACK_BOUNDARY;
   REGNO_POINTER_ALIGN (VIRTUAL_STACK_VARS_REGNUM) = STACK_BOUNDARY;
   REGNO_POINTER_ALIGN (VIRTUAL_STACK_DYNAMIC_REGNUM) = STACK_BOUNDARY;
   REGNO_POINTER_ALIGN (VIRTUAL_OUTGOING_ARGS_REGNUM) = STACK_BOUNDARY;
+
   REGNO_POINTER_ALIGN (VIRTUAL_CFA_REGNUM) = BITS_PER_WORD;
 #endif
 
index 4e081fb42a236654c6bb3a9d816274d771720202..67cb6ff1513b113d4e5eee01396340340c3ddd48 100644 (file)
@@ -1233,15 +1233,9 @@ get_dynamic_stack_size (rtx *psize, unsigned size_align,
      example), so we must preventively align the value.  We leave space
      in SIZE for the hole that might result from the alignment operation.  */
 
-  unsigned known_align = REGNO_POINTER_ALIGN (VIRTUAL_STACK_DYNAMIC_REGNUM);
-  if (known_align == 0)
-    known_align = BITS_PER_UNIT;
-  if (required_align > known_align)
-    {
-      extra = (required_align - known_align) / BITS_PER_UNIT;
-      size = plus_constant (Pmode, size, extra);
-      size = force_operand (size, NULL_RTX);
-    }
+  extra = (required_align - BITS_PER_UNIT) / BITS_PER_UNIT;
+  size = plus_constant (Pmode, size, extra);
+  size = force_operand (size, NULL_RTX);
 
   if (flag_stack_usage_info && pstack_usage_size)
     *pstack_usage_size += extra;