From: Richard Sandiford <rdsandiford@googlemail.com>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: Kirill Yukhin <kirill.yukhin@gmail.com>,
Richard Henderson <rth@redhat.com>,
Tejas Belagod <tbelagod@arm.com>, "Yukhin\,
Kirill" <kirill.yukhin@intel.com>, Jeff Law <law@redhat.com>,
Bill Schmidt <wschmidt@linux.vnet.ibm.com>,
"gcc-patches\@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
Uros Bizjak <ubizjak@gmail.com>,
Jakub Jelinek <jakub@redhat.com>
Subject: Re: [Patch, RTL] Eliminate redundant vec_select moves.
Date: Tue, 10 Dec 2013 18:45:00 -0000 [thread overview]
Message-ID: <87y53s5yvr.fsf@talisman.default> (raw)
In-Reply-To: <CAMe9rOq1hCZgrzHBjAdv6RUk3PJa_9JS_nz0xXaya16L11M-2w@mail.gmail.com> (H. J. Lu's message of "Tue, 10 Dec 2013 10:33:07 -0800")
"H.J. Lu" <hjl.tools@gmail.com> writes:
> On Tue, Dec 10, 2013 at 10:26 AM, Richard Sandiford
> <rdsandiford@googlemail.com> wrote:
>> "H.J. Lu" <hjl.tools@gmail.com> writes:
>>> On Tue, Dec 10, 2013 at 9:57 AM, Richard Sandiford
>>> <rdsandiford@googlemail.com> wrote:
>>>> "H.J. Lu" <hjl.tools@gmail.com> writes:
>>>>> On Tue, Dec 10, 2013 at 8:05 AM, Kirill Yukhin
>>>>> <kirill.yukhin@gmail.com> wrote:
>>>>>> On 09 Dec 14:08, H.J. Lu wrote:
>>>>>>>
>>>>>>> There are no regressions on Linux/x86-64 with -m32 and -m64.
>>>>>>> Can you check if it improves code quality on x886?
>>>>>>
>>>>>> As second thought. If Tejas and Richard are right and it is simply
>>>>>> incorrect
>>>>>> to check any offsets in this hook, may be we can end up with patch in the
>>>>>> bottom?
>>>>>
>>>>> What is wrong to pass the correct offset to
>>>>> CANNOT_CHANGE_MODE_CLASS? Backends are free to
>>>>> ignore it.
>>>>
>>>> The point is that:
>>>>
>>>>>> - /* Vector registers do not support subreg with nonzero offsets,
>>>>>> which
>>>>>> - are otherwise valid for integer registers. Since we can't see
>>>>>> - whether we have a nonzero offset from here, prohibit all
>>>>>> - nonparadoxical subregs changing size. */
>>>>>> - if (GET_MODE_SIZE (to) < GET_MODE_SIZE (from))
>>>>>> - return true;
>>>>
>>>> seems to be trying to reject things like (subreg:SF (reg:V4SF X) 1),
>>>> which is always invalid for a single-register V4SF. See:
>>>
>>> That is correct.
>>
>> Sorry, what I mean is: that subreg is always invalid for single-
>> register V4SFs regardless of the target. This isn't something that
>> CANNOT_CHANGE_MODE_CLASS should be expected to check.
>>
>
> Why is
>
> (define_insn "*movv4sfdi_subreg"
> [(set (match_operand:DI 0 "nonimmediate_operand" "=rxm")
> (subreg:DI (match_operand:V4SF 1 "register_operand" "x") 0))]
>
> invalid?
Sorry, I don't understand. I never said it was invalid. I said
(subreg:SF (reg:V4SF X) 1) was invalid if (reg:V4SF X) represents
a single register. On a little-endian target, the offset cannot be
anything other than 0 in that case.
So the CANNOT_CHANGE_MODE_CLASS code above seems to be checking for
something that is always invalid, regardless of the target. That kind
of situation should be rejected by target-independent code instead.
In other words I'm arguing against the idea of passing the offset to
CANNOT_CHANGE_MODE_CLASS (which you seemed to be supporting in the
quote above). I think Kirill's patch to remove the i386.c check was
the right way to go.
There's no need for a separate insn though. Once you allow the subregs
(as per Kirill's patch), the normal move patterns will handle them.
Thanks,
Richard
next prev parent reply other threads:[~2013-12-10 18:45 UTC|newest]
Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-06 13:37 Tejas Belagod
2013-11-06 14:07 ` Richard Biener
2013-11-06 16:45 ` Bill Schmidt
2013-11-06 17:07 ` Bill Schmidt
2013-11-06 14:25 ` Richard Sandiford
2013-11-06 15:37 ` Tejas Belagod
2013-11-06 16:14 ` Richard Sandiford
2013-11-06 17:11 ` Tejas Belagod
2013-11-06 18:34 ` Richard Sandiford
2013-11-06 19:42 ` Bill Schmidt
2013-11-07 14:37 ` Tejas Belagod
2013-11-07 15:15 ` Richard Sandiford
2013-11-07 18:05 ` Tejas Belagod
2013-11-10 20:59 ` Richard Sandiford
2013-11-27 17:59 ` Tejas Belagod
2013-11-28 11:33 ` Richard Sandiford
2013-12-04 16:07 ` Tejas Belagod
2013-12-04 16:14 ` H.J. Lu
2013-12-04 17:29 ` Jeff Law
2013-12-04 17:31 ` H.J. Lu
2013-12-05 13:17 ` Tejas Belagod
2013-12-05 13:30 ` H.J. Lu
2013-12-05 13:42 ` Kirill Yukhin
2013-12-09 6:51 ` Kirill Yukhin
2013-12-09 9:56 ` Tejas Belagod
2013-12-09 12:01 ` Richard Sandiford
2013-12-09 13:00 ` H.J. Lu
2013-12-09 13:49 ` H.J. Lu
2013-12-09 22:08 ` H.J. Lu
2013-12-10 14:53 ` Kirill Yukhin
2013-12-10 16:52 ` Paul_Koning
2013-12-10 16:07 ` Kirill Yukhin
2013-12-10 16:24 ` H.J. Lu
2013-12-10 17:07 ` Kirill Yukhin
2013-12-10 17:14 ` H.J. Lu
2013-12-10 17:26 ` Tejas Belagod
2013-12-10 17:39 ` H.J. Lu
2013-12-10 19:05 ` Tejas Belagod
2013-12-10 19:12 ` H.J. Lu
2013-12-10 19:52 ` Paul_Koning
2013-12-10 17:57 ` Richard Sandiford
2013-12-10 18:21 ` H.J. Lu
2013-12-10 18:26 ` Richard Sandiford
2013-12-10 18:33 ` H.J. Lu
2013-12-10 18:45 ` Richard Sandiford [this message]
2013-12-10 18:46 ` H.J. Lu
2013-12-10 20:40 ` Richard Henderson
2013-12-10 21:09 ` H.J. Lu
2013-12-10 21:51 ` H.J. Lu
2013-12-10 22:25 ` Tejas Belagod
2013-12-10 22:33 ` H.J. Lu
2013-12-11 1:33 ` H.J. Lu
2013-12-11 9:14 ` Richard Sandiford
2013-12-11 13:10 ` H.J. Lu
2013-12-11 15:49 ` Richard Sandiford
2013-12-11 16:09 ` H.J. Lu
2013-12-11 16:26 ` Tejas Belagod
2013-12-11 16:35 ` H.J. Lu
2013-12-11 16:45 ` Tejas Belagod
2013-12-14 16:32 ` H.J. Lu
2013-12-14 22:44 ` RFC: PATCH: Add subreg_byte to REG_CANNOT_CHANGE_MODE_P H.J. Lu
2013-12-10 17:02 ` [Patch, RTL] Eliminate redundant vec_select moves H.J. Lu
2013-12-10 17:11 ` Kirill Yukhin
2013-12-10 17:12 ` H.J. Lu
2013-12-05 22:38 ` Jakub Jelinek
2013-12-06 11:36 ` Tejas Belagod
2013-12-06 17:12 ` Tejas Belagod
2013-12-06 17:20 ` Jakub Jelinek
2013-12-04 17:36 ` Richard Sandiford
2013-12-04 20:04 ` Jeff Law
2013-12-05 16:12 ` Tejas Belagod
2013-12-05 16:20 ` Jeff Law
2020-04-22 16:43 ` [rtl] Harden 'set_noop_p' for non-constant selectors [PR94279] (was: [Patch, RTL] Eliminate redundant vec_select moves) Thomas Schwinge
2020-04-22 17:01 ` [rtl] Harden 'set_noop_p' for non-constant selectors [PR94279] Andrew Stubbs
2020-04-22 17:23 ` Richard Sandiford
2020-04-29 8:44 ` Thomas Schwinge
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=87y53s5yvr.fsf@talisman.default \
--to=rdsandiford@googlemail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hjl.tools@gmail.com \
--cc=jakub@redhat.com \
--cc=kirill.yukhin@gmail.com \
--cc=kirill.yukhin@intel.com \
--cc=law@redhat.com \
--cc=rth@redhat.com \
--cc=tbelagod@arm.com \
--cc=ubizjak@gmail.com \
--cc=wschmidt@linux.vnet.ibm.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).