public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Uros Bizjak <ubizjak@gmail.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: [PATCH, i386]: Committed: Fix PR target/35496
Date: Sun, 09 Mar 2008 13:38:00 -0000	[thread overview]
Message-ID: <47D3E838.8000204@gmail.com> (raw)

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;

             reply	other threads:[~2008-03-09 13:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-09 13:38 Uros Bizjak [this message]
2008-03-09 14:26 ` H.J. Lu
2008-03-09 17:07   ` Uros Bizjak
2008-03-09 17:33     ` H.J. Lu
2008-03-09 18:40       ` Uros Bizjak
2008-03-09 20:17         ` H.J. Lu
2008-03-09 20:53           ` Uros Bizjak
2008-03-10 14:58             ` Kaveh R. GHAZI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47D3E838.8000204@gmail.com \
    --to=ubizjak@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).