public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Uros Bizjak <ubizjak@gmail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] Use GET_MODE_BITSIZE to get vector natural alignment
Date: Mon, 19 Oct 2015 11:13:00 -0000	[thread overview]
Message-ID: <CAFULd4YM9Dz5omLARveK+OzqZXR3XgYxrDdtLO18oNjfwKXygw@mail.gmail.com> (raw)
In-Reply-To: <CAMe9rOpoOS5VsBnJ44oemKsFbPF7xbK+_tUxNVofq3RVx3UKoA@mail.gmail.com>

On Mon, Oct 19, 2015 at 1:12 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Mon, Oct 19, 2015 at 4:05 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
>> On Fri, Oct 16, 2015 at 7:42 PM, H.J. Lu <hongjiu.lu@intel.com> wrote:
>>> Since GET_MODE_ALIGNMENT is defined by psABI and the biggest alignment
>>> is 4 byte for IA MCU psABI, we should use GET_MODE_BITSIZE to get
>>> vector natural alignment to check misaligned vector move.
>>>
>>> OK for trunk?
>>>
>>> Thanks.
>>>
>>> H.J.
>>> ---
>>>         * config/i386/i386.c (ix86_expand_vector_move): Use
>>>         GET_MODE_BITSIZE to get vector natural alignment.
>>> ---
>>>  gcc/config/i386/i386.c | 4 +++-
>>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
>>> index ebe2b0a..d0e1f4c 100644
>>> --- a/gcc/config/i386/i386.c
>>> +++ b/gcc/config/i386/i386.c
>>> @@ -18650,7 +18650,9 @@ void
>>>  ix86_expand_vector_move (machine_mode mode, rtx operands[])
>>>  {
>>>    rtx op0 = operands[0], op1 = operands[1];
>>> -  unsigned int align = GET_MODE_ALIGNMENT (mode);
>>> +  /* Use GET_MODE_BITSIZE instead of GET_MODE_ALIGNMENT since the
>>> +     biggest alignment is 4 byte for IA MCU psABI.  */
>>> +  unsigned int align = GET_MODE_BITSIZE (mode);
>>
>> How about using TARGET_IAMCU condition here and using bitsize only for
>> TARGET_IAMCU?
>>
>
> Works for me.  Is it OK with that change?

Yes.

Thanks,
Uros.

  reply	other threads:[~2015-10-19 11:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-16 17:49 H.J. Lu
2015-10-19 11:07 ` Uros Bizjak
2015-10-19 11:12   ` H.J. Lu
2015-10-19 11:13     ` Uros Bizjak [this message]
2015-10-19 11:43       ` H.J. Lu

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=CAFULd4YM9Dz5omLARveK+OzqZXR3XgYxrDdtLO18oNjfwKXygw@mail.gmail.com \
    --to=ubizjak@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hjl.tools@gmail.com \
    /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).