diff mbox

RFA: patch to fix PR58967

Message ID 5277F436.6040601@redhat.com
State New
Headers show

Commit Message

Vladimir Makarov Nov. 4, 2013, 7:23 p.m. UTC
The following patch fixes

   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58967

The removed code is too old.  To be honest, I even don't remember why I
added this.  LRA has been changed a lot since this change and now it
works fine without it.

There is no test for this case as it is too big.

The patch was successfully bootstrapped on ppc64 (with LRA) and tested
on ppc{32|64}.

Is it ok to commit it to the trunk?

2013-11-04  Vladimir Makarov  <vmakarov@redhat.com>

        PR rtl-optimization/58967
        * config/rs6000/rs6000.c (legitimate_lo_sum_address_p): Remove
        !lra_in_progress for mode sizes bigger word.


               && (mode == DFmode || mode == DDmode)))

Comments

David Edelsohn Nov. 4, 2013, 7:26 p.m. UTC | #1
On Mon, Nov 4, 2013 at 2:23 PM, Vladimir Makarov <vmakarov@redhat.com> wrote:
> The following patch fixes
>
>    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58967
>
> The removed code is too old.  To be honest, I even don't remember why I
> added this.  LRA has been changed a lot since this change and now it
> works fine without it.
>
> There is no test for this case as it is too big.
>
> The patch was successfully bootstrapped on ppc64 (with LRA) and tested
> on ppc{32|64}.
>
> Is it ok to commit it to the trunk?
>
> 2013-11-04  Vladimir Makarov  <vmakarov@redhat.com>
>
>         PR rtl-optimization/58967
>         * config/rs6000/rs6000.c (legitimate_lo_sum_address_p): Remove
>         !lra_in_progress for mode sizes bigger word.
>
>
> Index: config/rs6000/rs6000.c
> ===================================================================
> --- config/rs6000/rs6000.c      (revision 204305)
> +++ config/rs6000/rs6000.c      (working copy)
> @@ -6388,7 +6388,7 @@ legitimate_lo_sum_address_p (enum machin
>         return false;
>        if (GET_MODE_NUNITS (mode) != 1)
>         return false;
> -      if (! lra_in_progress && GET_MODE_SIZE (mode) > UNITS_PER_WORD
> +      if (GET_MODE_SIZE
> (mottp://gcc.gnu.org/bugzilla/show_bug.cgi?id=58967de) > UNITS_PER_WORD

This is okay, assuming the weird bugzilla URL paste shown in the patch
is not really included.

Thanks, David
Robert Dewar Nov. 4, 2013, 7:50 p.m. UTC | #2
On 11/4/2013 2:23 PM, Vladimir Makarov wrote:
> The following patch fixes
>
>     http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58967
>
> The removed code is too old.  To be honest, I even don't remember why I
> added this.  LRA has been changed a lot since this change and now it
> works fine without it.

Whenever I see a comment like this, it reminds me to remind everyone
to comment your code! Do not assume you will remember why you wrote
what you wrote, so even if it is you who will look at your code, write
comments for yourself assuming you have totally forgotten!
Vladimir Makarov Nov. 4, 2013, 9:13 p.m. UTC | #3
On 11/04/2013 02:26 PM, David Edelsohn wrote:
> On Mon, Nov 4, 2013 at 2:23 PM, Vladimir Makarov <vmakarov@redhat.com> wrote:
>> The following patch fixes
>>
>>    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58967
>>
>> The removed code is too old.  To be honest, I even don't remember why I
>> added this.  LRA has been changed a lot since this change and now it
>> works fine without it.
>>
>> There is no test for this case as it is too big.
>>
>> The patch was successfully bootstrapped on ppc64 (with LRA) and tested
>> on ppc{32|64}.
>>
>> Is it ok to commit it to the trunk?
>>
>> 2013-11-04  Vladimir Makarov  <vmakarov@redhat.com>
>>
>>         PR rtl-optimization/58967
>>         * config/rs6000/rs6000.c (legitimate_lo_sum_address_p): Remove
>>         !lra_in_progress for mode sizes bigger word.
>>
>>
>> Index: config/rs6000/rs6000.c
>> ===================================================================
>> --- config/rs6000/rs6000.c      (revision 204305)
>> +++ config/rs6000/rs6000.c      (working copy)
>> @@ -6388,7 +6388,7 @@ legitimate_lo_sum_address_p (enum machin
>>         return false;
>>        if (GET_MODE_NUNITS (mode) != 1)
>>         return false;
>> -      if (! lra_in_progress && GET_MODE_SIZE (mode) > UNITS_PER_WORD
>> +      if (GET_MODE_SIZE
>> (mottp://gcc.gnu.org/bugzilla/show_bug.cgi?id=58967de) > UNITS_PER_WORD
> This is okay, assuming the weird bugzilla URL paste shown in the patch
> is not really included.
>
>
Sorry, it was some garbage occurred when I composed the email.

Committed as rev. 204365.
diff mbox

Patch

Index: config/rs6000/rs6000.c
===================================================================
--- config/rs6000/rs6000.c      (revision 204305)
+++ config/rs6000/rs6000.c      (working copy)
@@ -6388,7 +6388,7 @@  legitimate_lo_sum_address_p (enum machin
        return false;
       if (GET_MODE_NUNITS (mode) != 1)
        return false;
-      if (! lra_in_progress && GET_MODE_SIZE (mode) > UNITS_PER_WORD
+      if (GET_MODE_SIZE
(mottp://gcc.gnu.org/bugzilla/show_bug.cgi?id=58967de) > UNITS_PER_WORD
          && !(/* ??? Assume floating point reg based on mode?  */
               TARGET_HARD_FLOAT && TARGET_FPRS && TARGET_DOUBLE_FLOAT