public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH][ARM][cleanup] Remove uses of CONST_DOUBLE_HIGH/LOW
@ 2015-11-05  9:32 Kyrill Tkachov
  2015-11-10 14:34 ` Ramana Radhakrishnan
  0 siblings, 1 reply; 3+ messages in thread
From: Kyrill Tkachov @ 2015-11-05  9:32 UTC (permalink / raw)
  To: GCC Patches; +Cc: Ramana Radhakrishnan, Richard Earnshaw

[-- Attachment #1: Type: text/plain, Size: 423 bytes --]

Hi all,

This cleanup patch removes handling of CONST_DOUBLE rtxes that carry large integers.
These should never be passed down from the midend and the arm backend doesn't create them.
The code has been there since 2007 but the arm backend was moved to TARGET_SUPPORTS_WIDE_INT
in 2014, so this path should never be taken.

Bootstrapped and tested on arm-none-linux-gnueabihf.

Ok for trunk?

Thanks,
Kyrill


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: arm-const-double_high_low.patch --]
[-- Type: text/x-patch; name=arm-const-double_high_low.patch, Size: 1484 bytes --]

commit 8a1c27b21e6662c3203b95c457c0df5c0239805e
Author: Kyrylo Tkachov <kyrylo.tkachov@arm.com>
Date:   Thu Oct 29 11:20:43 2015 +0000

    [ARM][cleanup] Remove uses of CONST_DOUBLE_HIGH/LOW

diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 5c97786..36958af 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -12386,32 +12386,15 @@ neon_valid_immediate (rtx op, machine_mode mode, int inverse,
     {
       rtx el = vector ? CONST_VECTOR_ELT (op, i) : op;
       unsigned HOST_WIDE_INT elpart;
-      unsigned int part, parts;
 
-      if (CONST_INT_P (el))
-        {
-          elpart = INTVAL (el);
-          parts = 1;
-        }
-      else if (CONST_DOUBLE_P (el))
-        {
-          elpart = CONST_DOUBLE_LOW (el);
-          parts = 2;
-        }
-      else
-        gcc_unreachable ();
+      gcc_assert (CONST_INT_P (el));
+      elpart = INTVAL (el);
 
-      for (part = 0; part < parts; part++)
-        {
-          unsigned int byte;
-          for (byte = 0; byte < innersize; byte++)
-            {
-              bytes[idx++] = (elpart & 0xff) ^ invmask;
-              elpart >>= BITS_PER_UNIT;
-            }
-          if (CONST_DOUBLE_P (el))
-            elpart = CONST_DOUBLE_HIGH (el);
-        }
+      for (unsigned int byte = 0; byte < innersize; byte++)
+	{
+	  bytes[idx++] = (elpart & 0xff) ^ invmask;
+	  elpart >>= BITS_PER_UNIT;
+	}
     }
 
   /* Sanity check.  */

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][ARM][cleanup] Remove uses of CONST_DOUBLE_HIGH/LOW
  2015-11-05  9:32 [PATCH][ARM][cleanup] Remove uses of CONST_DOUBLE_HIGH/LOW Kyrill Tkachov
@ 2015-11-10 14:34 ` Ramana Radhakrishnan
  2015-11-10 17:28   ` Kyrill Tkachov
  0 siblings, 1 reply; 3+ messages in thread
From: Ramana Radhakrishnan @ 2015-11-10 14:34 UTC (permalink / raw)
  To: Kyrill Tkachov; +Cc: GCC Patches, Ramana Radhakrishnan, Richard Earnshaw

On Thu, Nov 5, 2015 at 9:32 AM, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote:
> Hi all,
>
> This cleanup patch removes handling of CONST_DOUBLE rtxes that carry large
> integers.
> These should never be passed down from the midend and the arm backend
> doesn't create them.
> The code has been there since 2007 but the arm backend was moved to
> TARGET_SUPPORTS_WIDE_INT
> in 2014, so this path should never be taken.
>
> Bootstrapped and tested on arm-none-linux-gnueabihf.
>
> Ok for trunk?


This is OK -

Ramana
>
> Thanks,
> Kyrill
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH][ARM][cleanup] Remove uses of CONST_DOUBLE_HIGH/LOW
  2015-11-10 14:34 ` Ramana Radhakrishnan
@ 2015-11-10 17:28   ` Kyrill Tkachov
  0 siblings, 0 replies; 3+ messages in thread
From: Kyrill Tkachov @ 2015-11-10 17:28 UTC (permalink / raw)
  To: Ramana Radhakrishnan; +Cc: GCC Patches, Ramana Radhakrishnan, Richard Earnshaw

Hi Ramana,

On 10/11/15 14:33, Ramana Radhakrishnan wrote:
> On Thu, Nov 5, 2015 at 9:32 AM, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote:
>> Hi all,
>>
>> This cleanup patch removes handling of CONST_DOUBLE rtxes that carry large
>> integers.
>> These should never be passed down from the midend and the arm backend
>> doesn't create them.
>> The code has been there since 2007 but the arm backend was moved to
>> TARGET_SUPPORTS_WIDE_INT
>> in 2014, so this path should never be taken.
>>
>> Bootstrapped and tested on arm-none-linux-gnueabihf.
>>
>> Ok for trunk?
>
> This is OK -

Thanks for reviewing.
Sorry I had forgotten the ChangeLog in the initial submission.
It is
2015-11-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

     * config/arm/arm.c (neon_valid_immediate): Remove integer
     CONST_DOUBLE handling.  It should never occur.

I have committed the patch with that entry as r230115.

Thanks,
Kyrill

> Ramana
>> Thanks,
>> Kyrill
>>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-10 17:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-05  9:32 [PATCH][ARM][cleanup] Remove uses of CONST_DOUBLE_HIGH/LOW Kyrill Tkachov
2015-11-10 14:34 ` Ramana Radhakrishnan
2015-11-10 17:28   ` Kyrill Tkachov

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).