diff mbox

[i386] Partially revert ix86_cannot_change_mode_class changes

Message ID CAFULd4YsXLSRjr6Lmr8AqmrokqxH6wAx2cOYL5go79VoehDCow@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak Feb. 4, 2016, 7:49 p.m. UTC
Hello!

After PR rtl-optimization/69577 fix went in, it looks that we can
remove various kludges involving SSE and MMX register classes from
ix86_cannot_change_mode_class.

2016-02-04  Uros Bizjak  <ubizjak@gmail.com>

    PR rtl-optimization/69577
    Revert:
    2015-10-29  Richard Henderson  <rth@redhat.com>

    PR target/68124
    PR rtl-opt/67609
    * config/i386/i386.c (ix86_cannot_change_mode_class): Tighten
    sse check to the exact conditions of PR 67609.

Patch was bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.

rth, as the author of the patch the attached patch is reverting, does
the patch look OK to you?

Uros.

Comments

Uros Bizjak Feb. 4, 2016, 8:07 p.m. UTC | #1
Adding forgotten CCs...

On Thu, Feb 4, 2016 at 8:49 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
> Hello!
>
> After PR rtl-optimization/69577 fix went in, it looks that we can
> remove various kludges involving SSE and MMX register classes from
> ix86_cannot_change_mode_class.
>
> 2016-02-04  Uros Bizjak  <ubizjak@gmail.com>
>
>     PR rtl-optimization/69577
>     Revert:
>     2015-10-29  Richard Henderson  <rth@redhat.com>
>
>     PR target/68124
>     PR rtl-opt/67609
>     * config/i386/i386.c (ix86_cannot_change_mode_class): Tighten
>     sse check to the exact conditions of PR 67609.
>
> Patch was bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.
>
> rth, as the author of the patch the attached patch is reverting, does
> the patch look OK to you?
>
> Uros.
Richard Henderson Feb. 4, 2016, 8:43 p.m. UTC | #2
On 02/05/2016 07:07 AM, Uros Bizjak wrote:
> Adding forgotten CCs...
>
> On Thu, Feb 4, 2016 at 8:49 PM, Uros Bizjak <ubizjak@gmail.com> wrote:
>> Hello!
>>
>> After PR rtl-optimization/69577 fix went in, it looks that we can
>> remove various kludges involving SSE and MMX register classes from
>> ix86_cannot_change_mode_class.
>>
>> 2016-02-04  Uros Bizjak  <ubizjak@gmail.com>
>>
>>      PR rtl-optimization/69577
>>      Revert:
>>      2015-10-29  Richard Henderson  <rth@redhat.com>
>>
>>      PR target/68124
>>      PR rtl-opt/67609
>>      * config/i386/i386.c (ix86_cannot_change_mode_class): Tighten
>>      sse check to the exact conditions of PR 67609.
>>
>> Patch was bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.
>>
>> rth, as the author of the patch the attached patch is reverting, does
>> the patch look OK to you?

Yes, reverting the cannot_change_mode_class kludge is fine now.


r~
diff mbox

Patch

Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c	(revision 233143)
+++ config/i386/i386.c	(working copy)
@@ -43283,25 +43283,12 @@  ix86_cannot_change_mode_class (machine_mode from,
 
   if (MAYBE_SSE_CLASS_P (regclass) || MAYBE_MMX_CLASS_P (regclass))
     {
-      int from_size = GET_MODE_SIZE (from);
-      int to_size = GET_MODE_SIZE (to);
-
       /* Vector registers do not support QI or HImode loads.  If we don't
 	 disallow a change to these modes, reload will assume it's ok to
 	 drop the subreg from (subreg:SI (reg:HI 100) 0).  This affects
 	 the vec_dupv4hi pattern.  */
-      if (from_size < 4)
+      if (GET_MODE_SIZE (from) < 4)
 	return true;
-
-      /* Further, we cannot allow word_mode subregs of full vector modes.
-         Otherwise the middle-end will assume it's ok to store to
-         (subreg:DI (reg:TI 100) 0) in order to modify only the low 64 bits
-         of the 128-bit register.  However, after reload the subreg will
-         be dropped leaving a plain DImode store.  This is indistinguishable
-         from a "normal" DImode move, and so we're justified to use movsd,
-         which modifies the entire 128-bit register.  */
-      if (to_size == UNITS_PER_WORD && from_size > UNITS_PER_WORD)
-	return true;
     }
 
   return false;