diff mbox series

[i386] : Simplify ix86_check_avx_upper_register

Message ID CAFULd4bJ+m8n8HBKRruY1qbjYNSQRD=EZPTmi+v-JG_1Xwb+BA@mail.gmail.com
State New
Headers show
Series [i386] : Simplify ix86_check_avx_upper_register | expand

Commit Message

Uros Bizjak Nov. 22, 2018, 9:27 p.m. UTC
2018-11-22  Uros Bizjak  <ubizjak@gmail.com>

    * config/i386/i386.c (ix86_check_avx_upper_register):
    Return true for all SSE registers with mode bitsize > 128.

Bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.

Committed to mainline SVN.

Uros.
diff mbox series

Patch

Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c	(revision 266382)
+++ config/i386/i386.c	(working copy)
@@ -18856,12 +18856,7 @@ 
 static bool
 ix86_check_avx_upper_register (const_rtx exp)
 {
-  if (SUBREG_P (exp))
-    exp = SUBREG_REG (exp);
-
-  return (REG_P (exp)
-	&& (VALID_AVX256_REG_OR_OI_MODE (GET_MODE (exp))
-	|| VALID_AVX512F_REG_OR_XI_MODE (GET_MODE (exp))));
+  return SSE_REG_P (exp) && GET_MODE_BITSIZE (GET_MODE (exp)) > 128;
 }
 
 /* Return needed mode for entity in optimize_mode_switching pass.  */