From: "H.J. Lu" <hjl.tools@gmail.com>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH, i386]: Remaining FP moves cleanups
Date: Tue, 07 Jun 2011 14:08:00 -0000 [thread overview]
Message-ID: <BANLkTimpd0f-WDpZEA_uHt2MutWN=mMDdQ@mail.gmail.com> (raw)
In-Reply-To: <BANLkTimozGYneD-6xQn7qo1LYo82pEA26Q@mail.gmail.com>
On Tue, Jun 7, 2011 at 7:02 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Tue, Jun 7, 2011 at 3:42 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>
>>> 2011-06-05 Uros Bizjak <ubizjak@gmail.com>
>>>
>>> * config/i386/i386.md (*movdf_internal_rex64) <case 8,9,10>:
>>> Remove MODE_TI handling. Remove SSE1 handling in attribute "mode"
>>> calculation.
>>> (*movdf_internal_rex64) <case 6,7,8>: Remove MODE_TI handling.
>>> Simplify MODE_V1DF and MODE_V2SF handling.
>>> (*movsf_internal): Remove x constraint from operand 1 alternative 7.
>>> Simplify MODE_SF handling.
>>>
>>> Patch was bootstrapped and regression tested on x86_64-pc-linux-gnuj
>>> {,-m32} AVX target. Committed to mainline SVN.
>>>
>>
>> Hi Uros,
>>
>> The new *movsf_internal patter has
>>
>> [(set (match_operand:SF 0 "nonimmediate_operand"
>> "=f,m,f,?r ,?m,x,x,x,m,!*y,!m,!*y,?Yi,?r,!*Ym,!r")
>> (match_operand:SF 1 "general_operand"
>> "fm,f,G,rmF,Fr,C,x,m,x,m ,*y,*y ,r ,Yi,r ,*Ym"))]
>> ...
>> case 7:
>> case 8:
>> if (TARGET_AVX && REG_P (operands[0]) && REG_P (operands[1]))
>> return "vmovss\t{%1, %0, %0|%0, %0, %1}";
>> return "%vmovss\t{%1, %0|%0, %1}";
>>
>> Since 7 is store and 8 is load,
>>
>> if (TARGET_AVX && REG_P (operands[0]) && REG_P (operands[1]))
>>
>> will always be false. Should we remove it?
>
> No, because it also handles fallthru from case 6.
>
> OTOH, you are right, this statement can be moved to case 6, without
> the check for registers.
>
Like this? OK for trunk with a ChangeLog entry?
Thanks.
--
H.J.
----
diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md
index 58de87b..a61bffb 100644
--- a/gcc/config/i386/i386.md
+++ b/gcc/config/i386/i386.md
@@ -3207,11 +3207,11 @@
case 6:
if (get_attr_mode (insn) == MODE_V4SF)
return "%vmovaps\t{%1, %0|%0, %1}";
+ else if (TARGET_AVX && REG_P (operands[0]) && REG_P (operands[1]))
+ return "vmovss\t{%1, %0, %0|%0, %0, %1}";
case 7:
case 8:
- if (TARGET_AVX && REG_P (operands[0]) && REG_P (operands[1]))
- return "vmovss\t{%1, %0, %0|%0, %0, %1}";
return "%vmovss\t{%1, %0|%0, %1}";
case 9:
next prev parent reply other threads:[~2011-06-07 14:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-05 20:46 Uros Bizjak
2011-06-07 13:43 ` H.J. Lu
2011-06-07 14:03 ` Uros Bizjak
2011-06-07 14:08 ` H.J. Lu [this message]
2011-06-07 14:12 ` Uros Bizjak
2011-06-07 14:55 ` 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='BANLkTimpd0f-WDpZEA_uHt2MutWN=mMDdQ@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=ubizjak@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).