* Fix pessimistic DImode handling in combine.c:make_field_assignment
@ 2017-05-24 8:44 Richard Sandiford
2017-05-30 8:33 ` Richard Sandiford
2017-06-12 9:17 ` Eric Botcazou
0 siblings, 2 replies; 4+ messages in thread
From: Richard Sandiford @ 2017-05-24 8:44 UTC (permalink / raw)
To: gcc-patches
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.
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);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Fix pessimistic DImode handling in combine.c:make_field_assignment
2017-05-24 8:44 Fix pessimistic DImode handling in combine.c:make_field_assignment Richard Sandiford
@ 2017-05-30 8:33 ` Richard Sandiford
2017-06-12 6:36 ` Richard Sandiford
2017-06-12 9:17 ` Eric Botcazou
1 sibling, 1 reply; 4+ messages in thread
From: Richard Sandiford @ 2017-05-30 8:33 UTC (permalink / raw)
To: gcc-patches
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);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Fix pessimistic DImode handling in combine.c:make_field_assignment
2017-05-30 8:33 ` Richard Sandiford
@ 2017-06-12 6:36 ` Richard Sandiford
0 siblings, 0 replies; 4+ messages in thread
From: Richard Sandiford @ 2017-06-12 6:36 UTC (permalink / raw)
To: gcc-patches
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);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Fix pessimistic DImode handling in combine.c:make_field_assignment
2017-05-24 8:44 Fix pessimistic DImode handling in combine.c:make_field_assignment Richard Sandiford
2017-05-30 8:33 ` Richard Sandiford
@ 2017-06-12 9:17 ` Eric Botcazou
1 sibling, 0 replies; 4+ messages in thread
From: Eric Botcazou @ 2017-06-12 9:17 UTC (permalink / raw)
To: Richard Sandiford; +Cc: gcc-patches
> 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.
OK for mainline.
--
Eric Botcazou
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-06-12 9:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-24 8:44 Fix pessimistic DImode handling in combine.c:make_field_assignment Richard Sandiford
2017-05-30 8:33 ` Richard Sandiford
2017-06-12 6:36 ` Richard Sandiford
2017-06-12 9:17 ` Eric Botcazou
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).