diff mbox

[5/5] Remove CANNOT_CHANGE_MODE_CLASS workaround in i386.c

Message ID 874mw5ns0x.fsf@e105548-lin.cambridge.arm.com
State New
Headers show

Commit Message

Richard Sandiford Sept. 18, 2014, 10:26 a.m. UTC
Patch 4 should make it possible to relax i386'a CANNOT_CHANGE_MODE_CLASS,
solving the missed optimisation that triggered the original thread.


gcc/
	* config/i386/i386.c (ix86_cannot_change_mode_class): Remove
	GET_MODE_SIZE (to) < GET_MODE_SIZE (from) test.

Comments

Jeff Law Sept. 19, 2014, 5:53 p.m. UTC | #1
On 09/18/14 04:26, Richard Sandiford wrote:
> Patch 4 should make it possible to relax i386'a CANNOT_CHANGE_MODE_CLASS,
> solving the missed optimisation that triggered the original thread.
>
>
> gcc/
> 	* config/i386/i386.c (ix86_cannot_change_mode_class): Remove
> 	GET_MODE_SIZE (to) < GET_MODE_SIZE (from) test.
>
> Index: gcc/config/i386/i386.c
> ===================================================================
> --- gcc/config/i386/i386.c	2014-09-15 09:48:11.310438531 +0100
> +++ gcc/config/i386/i386.c	2014-09-15 09:48:11.310438531 +0100
> @@ -37526,13 +37526,6 @@ ix86_cannot_change_mode_class (enum mach
>   	 the vec_dupv4hi pattern.  */
>         if (GET_MODE_SIZE (from) < 4)
>   	return true;
> -
> -      /* Vector registers do not support subreg with nonzero offsets, which
> -	 are otherwise valid for integer registers.  Since we can't see
> -	 whether we have a nonzero offset from here, prohibit all
> -         nonparadoxical subregs changing size.  */
> -      if (GET_MODE_SIZE (to) < GET_MODE_SIZE (from))
> -	return true;
>       }
>
>     return false;
>
OK.
jeff
diff mbox

Patch

Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c	2014-09-15 09:48:11.310438531 +0100
+++ gcc/config/i386/i386.c	2014-09-15 09:48:11.310438531 +0100
@@ -37526,13 +37526,6 @@  ix86_cannot_change_mode_class (enum mach
 	 the vec_dupv4hi pattern.  */
       if (GET_MODE_SIZE (from) < 4)
 	return true;
-
-      /* Vector registers do not support subreg with nonzero offsets, which
-	 are otherwise valid for integer registers.  Since we can't see
-	 whether we have a nonzero offset from here, prohibit all
-         nonparadoxical subregs changing size.  */
-      if (GET_MODE_SIZE (to) < GET_MODE_SIZE (from))
-	return true;
     }
 
   return false;