This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, i386]: Committed: Fix PR target/35496


Hello!

We have to compute alignment of VECTOR_CST and INTEGER_CST constants via ALIGN_MODE_128 in the same way as other ALIGN_MODE_128 data is aligned.

2008-03-09 Uros Bizjak <ubizjak@gmail.com>

PR target/35496
* config/i386/i386.c (ix86_constant_algnment): Compute alignment using
ALIGN_MODE_128 for VECTOR_CST and INTEGER_CST in addition to REAL_CST.


Patch was bootstrapped and regression tested on x86_64-pc-linux-gnu {,-m32}. Patch is committed to mainline, but I think that it should be committed to 4.3 branch as well.

Uros.

Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c  (revision 133051)
+++ config/i386/i386.c  (working copy)
@@ -16789,7 +16789,8 @@
int
ix86_constant_alignment (tree exp, int align)
{
-  if (TREE_CODE (exp) == REAL_CST)
+  if (TREE_CODE (exp) == REAL_CST || TREE_CODE (exp) == VECTOR_CST
+      || TREE_CODE (exp) == INTEGER_CST)
    {
      if (TYPE_MODE (TREE_TYPE (exp)) == DFmode && align < 64)
       return 64;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]