diff mbox

[ARM,cleanup] Remove uses of CONST_DOUBLE_HIGH/LOW

Message ID 563B221D.2010201@arm.com
State New
Headers show

Commit Message

Kyrylo Tkachov Nov. 5, 2015, 9:32 a.m. UTC
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

Comments

Kyrylo Tkachov Nov. 10, 2015, 5:28 p.m. UTC | #1
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

>>
diff mbox

Patch

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.  */