From: Richard Sandiford <richard.sandiford@linaro.org>
To: gcc-patches@gcc.gnu.org
Subject: Re: Fix pessimistic DImode handling in combine.c:make_field_assignment
Date: Mon, 12 Jun 2017 06:36:00 -0000 [thread overview]
Message-ID: <87vao1soei.fsf@linaro.org> (raw)
In-Reply-To: <87poeqoitd.fsf@linaro.org> (Richard Sandiford's message of "Tue, 30 May 2017 09:22:22 +0100")
Ping
Richard Sandiford <richard.sandiford@linaro.org> writes:
> Richard Sandiford <richard.sandiford@linaro.org> writes:
>> The make_field_assignment code:
>>
>> src = force_to_mode (src, mode,
>> GET_MODE_PRECISION (mode) >= HOST_BITS_PER_WIDE_INT
>> ? HOST_WIDE_INT_M1U
>> : (HOST_WIDE_INT_1U << len) - 1,
>> 0);
>>
>> would ignore the field length len for DImode, even though DImode can be
>> handled using HWIs. I think the code should be testing len instead.
>>
>> The patch was originally part of the SVE machine_mode series.
>> Retesting showed that it changed the asm output on powerpc for a few
>> tests, so I thought it should go in separately. Each test change
>> seemed to be an improvement.
>>
>> Tested on aarch64-linux-gnu and x86_64-linux-gnu. I no longer have
>> access to the compile farm to test on the powerpc boxes there.
>
> Now tested on powerpc64le-linux-gnu too (thanks to Segher for the access).
>
>> Thanks,
>> Richard
>>
>>
>> 2017-05-24 Richard Sandiford <richard.sandiford@linaro.org>
>>
>> gcc/
>> * combine.c (make_field_assignment): Check len rather than the mode
>> precision when calling force_to_mode.
>>
>> Index: gcc/combine.c
>> ===================================================================
>> --- gcc/combine.c 2017-05-03 08:46:32.777861592 +0100
>> +++ gcc/combine.c 2017-05-24 09:25:25.170351268 +0100
>> @@ -9634,7 +9634,7 @@ make_field_assignment (rtx x)
>> other, pos),
>> dest);
>> src = force_to_mode (src, mode,
>> - GET_MODE_PRECISION (mode) >= HOST_BITS_PER_WIDE_INT
>> + len >= HOST_BITS_PER_WIDE_INT
>> ? HOST_WIDE_INT_M1U
>> : (HOST_WIDE_INT_1U << len) - 1,
>> 0);
next prev parent reply other threads:[~2017-06-12 6:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-24 8:44 Richard Sandiford
2017-05-30 8:33 ` Richard Sandiford
2017-06-12 6:36 ` Richard Sandiford [this message]
2017-06-12 9:17 ` Eric Botcazou
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=87vao1soei.fsf@linaro.org \
--to=richard.sandiford@linaro.org \
--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).