diff mbox series

[Arm] Disallow arm_movdi when targetting MVE

Message ID AM6PR08MB315768F50BC6AAFD55FC0CDDE0DB0@AM6PR08MB3157.eurprd08.prod.outlook.com
State New
Headers show
Series [Arm] Disallow arm_movdi when targetting MVE | expand

Commit Message

Matthew Malcomson April 15, 2020, 10:22 a.m. UTC
Without disabling this, the pattern can try and move DImode values
between floating point registers and general registers.
The constraints on this pattern can't handle that, and reload goes into
an infinite loop.

This was the cause of a testsuite failure in cde_v_1_mve.c, which is now
gone.

A DImode move for MVE now uses the `movdi_vfp` pattern, which is the same
pattern used for such a move when MVE is not available but the target has
TARGET_HARD_FLOAT.

Testing done:
    Bootstrapped and regtested on arm-none-linux-gnueabihf
    regtested on arm-none-eabi

gcc/ChangeLog:

2020-04-15  Matthew Malcomson  <matthew.malcomson@arm.com>

	* config/arm/arm.md (arm_movdi): Disallow for MVE.



###############     Attachment also inlined for ease of reply    ###############
diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 7bc55cce61b2e45e5875a233dd4546d59399d749..a6a31f8f4ef8d3c8c96c61b450dbd7c28d08b55c 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -6233,6 +6233,7 @@
 	(match_operand:DI 1 "di_operand"              "rDa,Db,Dc,mi,r"))]
   "TARGET_32BIT
    && !(TARGET_HARD_FLOAT)
+   && !(TARGET_HAVE_MVE || TARGET_HAVE_MVE_FLOAT)
    && !TARGET_IWMMXT
    && (   register_operand (operands[0], DImode)
        || register_operand (operands[1], DImode))"

Comments

Kyrylo Tkachov April 15, 2020, 11:22 a.m. UTC | #1
> -----Original Message-----
> From: Matthew Malcomson <Matthew.Malcomson@arm.com>
> Sent: 15 April 2020 11:23
> To: gcc-patches@gcc.gnu.org
> Cc: Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>; Ramana Radhakrishnan
> <Ramana.Radhakrishnan@arm.com>; Richard Earnshaw
> <Richard.Earnshaw@arm.com>; nd <nd@arm.com>
> Subject: [Arm] Disallow arm_movdi when targetting MVE
> 
> Without disabling this, the pattern can try and move DImode values
> between floating point registers and general registers.
> The constraints on this pattern can't handle that, and reload goes into
> an infinite loop.
> 
> This was the cause of a testsuite failure in cde_v_1_mve.c, which is now
> gone.
> 
> A DImode move for MVE now uses the `movdi_vfp` pattern, which is the
> same
> pattern used for such a move when MVE is not available but the target has
> TARGET_HARD_FLOAT.
> 

Ok.
Thanks,
Kyrill

> Testing done:
>     Bootstrapped and regtested on arm-none-linux-gnueabihf
>     regtested on arm-none-eabi
> 
> gcc/ChangeLog:
> 
> 2020-04-15  Matthew Malcomson  <matthew.malcomson@arm.com>
> 
> 	* config/arm/arm.md (arm_movdi): Disallow for MVE.
> 
> 
> 
> ###############     Attachment also inlined for ease of reply
> ###############
> 
> 
> diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
> index
> 7bc55cce61b2e45e5875a233dd4546d59399d749..a6a31f8f4ef8d3c8c96c61b4
> 50dbd7c28d08b55c 100644
> --- a/gcc/config/arm/arm.md
> +++ b/gcc/config/arm/arm.md
> @@ -6233,6 +6233,7 @@
>  	(match_operand:DI 1 "di_operand"              "rDa,Db,Dc,mi,r"))]
>    "TARGET_32BIT
>     && !(TARGET_HARD_FLOAT)
> +   && !(TARGET_HAVE_MVE || TARGET_HAVE_MVE_FLOAT)
>     && !TARGET_IWMMXT
>     && (   register_operand (operands[0], DImode)
>         || register_operand (operands[1], DImode))"
diff mbox series

Patch

diff --git a/gcc/config/arm/arm.md b/gcc/config/arm/arm.md
index 7bc55cce61b2e45e5875a233dd4546d59399d749..a6a31f8f4ef8d3c8c96c61b450dbd7c28d08b55c 100644
--- a/gcc/config/arm/arm.md
+++ b/gcc/config/arm/arm.md
@@ -6233,6 +6233,7 @@ 
 	(match_operand:DI 1 "di_operand"              "rDa,Db,Dc,mi,r"))]
   "TARGET_32BIT
    && !(TARGET_HARD_FLOAT)
+   && !(TARGET_HAVE_MVE || TARGET_HAVE_MVE_FLOAT)
    && !TARGET_IWMMXT
    && (   register_operand (operands[0], DImode)
        || register_operand (operands[1], DImode))"