* [PATCH][combine] Check WORD_REGISTER_OPERATIONS normally rather than through preprocessor
@ 2015-12-15 17:07 Kyrill Tkachov
2015-12-17 14:49 ` Segher Boessenkool
2016-04-17 21:25 ` Jeff Law
0 siblings, 2 replies; 6+ messages in thread
From: Kyrill Tkachov @ 2015-12-15 17:07 UTC (permalink / raw)
To: GCC Patches; +Cc: Segher Boessenkool
[-- Attachment #1: Type: text/plain, Size: 458 bytes --]
Hi all,
As part of the war on conditional compilation here's an #if check on WORD_REGISTER_OPERATIONS that
seems to have been missed out.
Bootstrapped and tested on arm, aarch64, x86_64.
Is it still ok to commit these kinds of conditional compilation conversions?
Thanks,
Kyrill
2015-12-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* combine.c (simplify_comparison): Convert preprocessor check of
WORD_REGISTER_OPERATIONS into runtime check.
[-- Attachment #2: combine-word-regs.patch --]
[-- Type: text/x-patch, Size: 1172 bytes --]
diff --git a/gcc/combine.c b/gcc/combine.c
index 8601d8983ce345e2129dd047b3520d98c0582842..0658a6dbc6df6862df662bc7842c13ed06b36b04 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -11488,10 +11488,10 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1)
/* Try a few ways of applying the same transformation to both operands. */
while (1)
{
-#if !WORD_REGISTER_OPERATIONS
/* The test below this one won't handle SIGN_EXTENDs on these machines,
so check specially. */
- if (code != GTU && code != GEU && code != LTU && code != LEU
+ if (!WORD_REGISTER_OPERATIONS && code != GTU && code != GEU
+ && code != LTU && code != LEU
&& GET_CODE (op0) == ASHIFTRT && GET_CODE (op1) == ASHIFTRT
&& GET_CODE (XEXP (op0, 0)) == ASHIFT
&& GET_CODE (XEXP (op1, 0)) == ASHIFT
@@ -11511,7 +11511,6 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1)
op0 = SUBREG_REG (XEXP (XEXP (op0, 0), 0));
op1 = SUBREG_REG (XEXP (XEXP (op1, 0), 0));
}
-#endif
/* If both operands are the same constant shift, see if we can ignore the
shift. We can if the shift is a rotate or if the bits shifted out of
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][combine] Check WORD_REGISTER_OPERATIONS normally rather than through preprocessor
2015-12-15 17:07 [PATCH][combine] Check WORD_REGISTER_OPERATIONS normally rather than through preprocessor Kyrill Tkachov
@ 2015-12-17 14:49 ` Segher Boessenkool
2015-12-22 10:39 ` Kyrill Tkachov
2016-04-17 21:25 ` Jeff Law
1 sibling, 1 reply; 6+ messages in thread
From: Segher Boessenkool @ 2015-12-17 14:49 UTC (permalink / raw)
To: Kyrill Tkachov; +Cc: GCC Patches
Hi Kyrill,
On Tue, Dec 15, 2015 at 05:07:41PM +0000, Kyrill Tkachov wrote:
> As part of the war on conditional compilation here's an #if check on
> WORD_REGISTER_OPERATIONS that
> seems to have been missed out.
>
> Bootstrapped and tested on arm, aarch64, x86_64.
>
> Is it still ok to commit these kinds of conditional compilation conversions?
You could say it is a bugfix, a missed case in the conversion ;-)
> diff --git a/gcc/combine.c b/gcc/combine.c
> index 8601d8983ce345e2129dd047b3520d98c0582842..0658a6dbc6df6862df662bc7842c13ed06b36b04 100644
> --- a/gcc/combine.c
> +++ b/gcc/combine.c
> @@ -11488,10 +11488,10 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1)
> /* Try a few ways of applying the same transformation to both operands. */
> while (1)
> {
> -#if !WORD_REGISTER_OPERATIONS
> /* The test below this one won't handle SIGN_EXTENDs on these machines,
> so check specially. */
> - if (code != GTU && code != GEU && code != LTU && code != LEU
> + if (!WORD_REGISTER_OPERATIONS && code != GTU && code != GEU
> + && code != LTU && code != LEU
Please keep all the code != together, i.e.
+ if (!WORD_REGISTER_OPERATIONS
+ && code != GTU && code != GEU && code != LTU && code != LEU
Okay with that change.
Segher
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][combine] Check WORD_REGISTER_OPERATIONS normally rather than through preprocessor
2015-12-17 14:49 ` Segher Boessenkool
@ 2015-12-22 10:39 ` Kyrill Tkachov
0 siblings, 0 replies; 6+ messages in thread
From: Kyrill Tkachov @ 2015-12-22 10:39 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: GCC Patches
[-- Attachment #1: Type: text/plain, Size: 1597 bytes --]
On 17/12/15 14:49, Segher Boessenkool wrote:
> Hi Kyrill,
>
> On Tue, Dec 15, 2015 at 05:07:41PM +0000, Kyrill Tkachov wrote:
>> As part of the war on conditional compilation here's an #if check on
>> WORD_REGISTER_OPERATIONS that
>> seems to have been missed out.
>>
>> Bootstrapped and tested on arm, aarch64, x86_64.
>>
>> Is it still ok to commit these kinds of conditional compilation conversions?
> You could say it is a bugfix, a missed case in the conversion ;-)
>
>> diff --git a/gcc/combine.c b/gcc/combine.c
>> index 8601d8983ce345e2129dd047b3520d98c0582842..0658a6dbc6df6862df662bc7842c13ed06b36b04 100644
>> --- a/gcc/combine.c
>> +++ b/gcc/combine.c
>> @@ -11488,10 +11488,10 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1)
>> /* Try a few ways of applying the same transformation to both operands. */
>> while (1)
>> {
>> -#if !WORD_REGISTER_OPERATIONS
>> /* The test below this one won't handle SIGN_EXTENDs on these machines,
>> so check specially. */
>> - if (code != GTU && code != GEU && code != LTU && code != LEU
>> + if (!WORD_REGISTER_OPERATIONS && code != GTU && code != GEU
>> + && code != LTU && code != LEU
> Please keep all the code != together, i.e.
>
> + if (!WORD_REGISTER_OPERATIONS
> + && code != GTU && code != GEU && code != LTU && code != LEU
>
> Okay with that change.
Thanks.
Here's what I'll be committing.
Kyrill
2015-12-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
* combine.c (simplify_comparison): Convert preprocessor check of
WORD_REGISTER_OPERATIONS into runtime check.
[-- Attachment #2: combine-word-regs.patch --]
[-- Type: text/x-patch, Size: 1172 bytes --]
diff --git a/gcc/combine.c b/gcc/combine.c
index dc0d4bd52c717b88608d21dbaffe444eeb68bb2d..36ea6df15010247c96a9fcac1649d3d958d64675 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -11436,10 +11436,10 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1)
/* Try a few ways of applying the same transformation to both operands. */
while (1)
{
-#if !WORD_REGISTER_OPERATIONS
/* The test below this one won't handle SIGN_EXTENDs on these machines,
so check specially. */
- if (code != GTU && code != GEU && code != LTU && code != LEU
+ if (!WORD_REGISTER_OPERATIONS
+ && code != GTU && code != GEU && code != LTU && code != LEU
&& GET_CODE (op0) == ASHIFTRT && GET_CODE (op1) == ASHIFTRT
&& GET_CODE (XEXP (op0, 0)) == ASHIFT
&& GET_CODE (XEXP (op1, 0)) == ASHIFT
@@ -11459,7 +11459,6 @@ simplify_comparison (enum rtx_code code, rtx *pop0, rtx *pop1)
op0 = SUBREG_REG (XEXP (XEXP (op0, 0), 0));
op1 = SUBREG_REG (XEXP (XEXP (op1, 0), 0));
}
-#endif
/* If both operands are the same constant shift, see if we can ignore the
shift. We can if the shift is a rotate or if the bits shifted out of
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][combine] Check WORD_REGISTER_OPERATIONS normally rather than through preprocessor
2015-12-15 17:07 [PATCH][combine] Check WORD_REGISTER_OPERATIONS normally rather than through preprocessor Kyrill Tkachov
2015-12-17 14:49 ` Segher Boessenkool
@ 2016-04-17 21:25 ` Jeff Law
2016-04-18 9:33 ` Kyrill Tkachov
1 sibling, 1 reply; 6+ messages in thread
From: Jeff Law @ 2016-04-17 21:25 UTC (permalink / raw)
To: Kyrill Tkachov, GCC Patches; +Cc: Segher Boessenkool
On 12/15/2015 10:07 AM, Kyrill Tkachov wrote:
> Hi all,
>
> As part of the war on conditional compilation here's an #if check on
> WORD_REGISTER_OPERATIONS that
> seems to have been missed out.
>
> Bootstrapped and tested on arm, aarch64, x86_64.
>
> Is it still ok to commit these kinds of conditional compilation
> conversions?
>
> Thanks,
> Kyrill
>
> 2015-12-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>
> * combine.c (simplify_comparison): Convert preprocessor check of
> WORD_REGISTER_OPERATIONS into runtime check.
This patch, and others like it are fine for the trunk (gcc-7) again.
I'll channel the release managers' request that we don't make large
scale changes that would make backporting patches exceedingly difficult.
So just keep that in mind if you find more conditionally compiled code
to kill.
jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][combine] Check WORD_REGISTER_OPERATIONS normally rather than through preprocessor
2016-04-17 21:25 ` Jeff Law
@ 2016-04-18 9:33 ` Kyrill Tkachov
2016-04-21 11:37 ` Jeff Law
0 siblings, 1 reply; 6+ messages in thread
From: Kyrill Tkachov @ 2016-04-18 9:33 UTC (permalink / raw)
To: Jeff Law, GCC Patches; +Cc: Segher Boessenkool
Hi Jeff,
On 17/04/16 21:16, Jeff Law wrote:
> On 12/15/2015 10:07 AM, Kyrill Tkachov wrote:
>> Hi all,
>>
>> As part of the war on conditional compilation here's an #if check on
>> WORD_REGISTER_OPERATIONS that
>> seems to have been missed out.
>>
>> Bootstrapped and tested on arm, aarch64, x86_64.
>>
>> Is it still ok to commit these kinds of conditional compilation
>> conversions?
>>
>> Thanks,
>> Kyrill
>>
>> 2015-12-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>>
>> * combine.c (simplify_comparison): Convert preprocessor check of
>> WORD_REGISTER_OPERATIONS into runtime check.
> This patch, and others like it are fine for the trunk (gcc-7) again.
>
Thanks, but I've committed this already in December after approval from Segher
(https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01771.html)
> I'll channel the release managers' request that we don't make large scale changes that would make backporting patches exceedingly difficult. So just keep that in mind if you find more conditionally compiled code to kill.
>
I do have some cleanups like that, but I'll post them after the release. I'm in no hurry to get
them in right this moment.
Thanks,
Kyrill
> jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][combine] Check WORD_REGISTER_OPERATIONS normally rather than through preprocessor
2016-04-18 9:33 ` Kyrill Tkachov
@ 2016-04-21 11:37 ` Jeff Law
0 siblings, 0 replies; 6+ messages in thread
From: Jeff Law @ 2016-04-21 11:37 UTC (permalink / raw)
To: Kyrill Tkachov, GCC Patches; +Cc: Segher Boessenkool
On 04/18/2016 03:33 AM, Kyrill Tkachov wrote:
> Hi Jeff,
>
> On 17/04/16 21:16, Jeff Law wrote:
>> On 12/15/2015 10:07 AM, Kyrill Tkachov wrote:
>>> Hi all,
>>>
>>> As part of the war on conditional compilation here's an #if check on
>>> WORD_REGISTER_OPERATIONS that
>>> seems to have been missed out.
>>>
>>> Bootstrapped and tested on arm, aarch64, x86_64.
>>>
>>> Is it still ok to commit these kinds of conditional compilation
>>> conversions?
>>>
>>> Thanks,
>>> Kyrill
>>>
>>> 2015-12-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
>>>
>>> * combine.c (simplify_comparison): Convert preprocessor check of
>>> WORD_REGISTER_OPERATIONS into runtime check.
>> This patch, and others like it are fine for the trunk (gcc-7) again.
>>
>
> Thanks, but I've committed this already in December after approval from
> Segher
> (https://gcc.gnu.org/ml/gcc-patches/2015-12/msg01771.html)
Ah, I just checked the 2016 stuff when I started flushing out the queue
of easy stuff ;-)
Sorry for the noise.
jeff
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-04-21 11:37 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-15 17:07 [PATCH][combine] Check WORD_REGISTER_OPERATIONS normally rather than through preprocessor Kyrill Tkachov
2015-12-17 14:49 ` Segher Boessenkool
2015-12-22 10:39 ` Kyrill Tkachov
2016-04-17 21:25 ` Jeff Law
2016-04-18 9:33 ` Kyrill Tkachov
2016-04-21 11:37 ` Jeff Law
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).