[Arm] Cleanup up reg to reg move in neon_mov.

Message ID 20180723165156.GA7803@arm.com
State New
Headers show
Series
  • [Arm] Cleanup up reg to reg move in neon_mov.
Related show

Commit Message

Tamar Christina July 23, 2018, 4:52 p.m.
Hi All,

About 13 years ago the reg-to-reg patterns were split up, before that time
output_move_double could actually handle this case.

After the split was done most patterns were updated except for *neon_mov
which incorrectly retained reg,reg as a valid alternative.

However output_move_double can not handle this and simply returns ""
and asserts.

This pattern is essentially dead and I'm removing it for clarity.

Regtested on armeb-none-eabi and no regressions.
Bootstrapped on arm-none-linux-gnueabihf and no issues.

Ok for trunk?

Thanks,
Tamar

gcc/
2018-07-23  Tamar Christina  <tamar.christina@arm.com>

	* config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.

--

Comments

Tamar Christina July 31, 2018, 9:45 a.m. | #1
Ping 😊

> -----Original Message-----

> From: gcc-patches-owner@gcc.gnu.org <gcc-patches-owner@gcc.gnu.org>

> On Behalf Of Tamar Christina

> Sent: Monday, July 23, 2018 17:52

> To: gcc-patches@gcc.gnu.org

> Cc: nd <nd@arm.com>; Ramana Radhakrishnan

> <Ramana.Radhakrishnan@arm.com>; Richard Earnshaw

> <Richard.Earnshaw@arm.com>; nickc@redhat.com; Kyrylo Tkachov

> <Kyrylo.Tkachov@arm.com>

> Subject: [PATCH][GCC][Arm] Cleanup up reg to reg move in neon_mov.

> 

> Hi All,

> 

> About 13 years ago the reg-to-reg patterns were split up, before that time

> output_move_double could actually handle this case.

> 

> After the split was done most patterns were updated except for *neon_mov

> which incorrectly retained reg,reg as a valid alternative.

> 

> However output_move_double can not handle this and simply returns ""

> and asserts.

> 

> This pattern is essentially dead and I'm removing it for clarity.

> 

> Regtested on armeb-none-eabi and no regressions.

> Bootstrapped on arm-none-linux-gnueabihf and no issues.

> 

> Ok for trunk?

> 

> Thanks,

> Tamar

> 

> gcc/

> 2018-07-23  Tamar Christina  <tamar.christina@arm.com>

> 

> 	* config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg

> alternative.

> 

> --
Kyrill Tkachov July 31, 2018, 10:59 a.m. | #2
Hi Tamar,

On 23/07/18 17:52, Tamar Christina wrote:
> Hi All,

>

> About 13 years ago the reg-to-reg patterns were split up, before that time

> output_move_double could actually handle this case.

>

> After the split was done most patterns were updated except for *neon_mov

> which incorrectly retained reg,reg as a valid alternative.

>

> However output_move_double can not handle this and simply returns ""

> and asserts.

>

> This pattern is essentially dead and I'm removing it for clarity.

>

> Regtested on armeb-none-eabi and no regressions.

> Bootstrapped on arm-none-linux-gnueabihf and no issues.

>

> Ok for trunk?

>


Ok.
Thanks,
Kyrill

> Thanks,

> Tamar

>

> gcc/

> 2018-07-23  Tamar Christina  <tamar.christina@arm.com>

>

>         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.

>

> --

Patch

diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md
index 57df17fe18dfeaa82e890fd339e2104ad27ee13b..55fc9a02ba526538cbc51e07e7d4add1a9c38002 100644
--- a/gcc/config/arm/neon.md
+++ b/gcc/config/arm/neon.md
@@ -25,9 +25,9 @@ 
 
 (define_insn "*neon_mov<mode>"
   [(set (match_operand:VDX 0 "nonimmediate_operand"
-	  "=w,Un,w, w,  ?r,?w,?r,?r, ?Us")
+	  "=w,Un,w, w,  ?r,?w,?r, ?Us")
 	(match_operand:VDX 1 "general_operand"
-	  " w,w, Dn,Uni, w, r, r, Usi,r"))]
+	  " w,w, Dn,Uni, w, r, Usi,r"))]
   "TARGET_NEON
    && (register_operand (operands[0], <MODE>mode)
        || register_operand (operands[1], <MODE>mode))"
@@ -61,12 +61,12 @@ 
     }
 }
  [(set_attr "type" "neon_move<q>,neon_store1_1reg,neon_move<q>,\
-                    neon_load1_1reg, neon_to_gp<q>,neon_from_gp<q>,mov_reg,\
+                    neon_load1_1reg, neon_to_gp<q>,neon_from_gp<q>,\
                     neon_load1_2reg, neon_store1_2reg")
-  (set_attr "length" "4,4,4,4,4,4,8,8,8")
-  (set_attr "arm_pool_range"     "*,*,*,1020,*,*,*,1020,*")
-  (set_attr "thumb2_pool_range"     "*,*,*,1018,*,*,*,1018,*")
-  (set_attr "neg_pool_range" "*,*,*,1004,*,*,*,1004,*")])
+  (set_attr "length" "4,4,4,4,4,4,8,8")
+  (set_attr "arm_pool_range"     "*,*,*,1020,*,*,1020,*")
+  (set_attr "thumb2_pool_range"     "*,*,*,1018,*,*,1018,*")
+  (set_attr "neg_pool_range" "*,*,*,1004,*,*,1004,*")])
 
 (define_insn "*neon_mov<mode>"
   [(set (match_operand:VQXMOV 0 "nonimmediate_operand"