]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Revert x86_order_regs_for_local_alloc changes in r12-1669.
authorliuhongt <hongtao.liu@intel.com>
Thu, 24 Jun 2021 08:14:13 +0000 (16:14 +0800)
committerliuhongt <hongtao.liu@intel.com>
Wed, 14 Jul 2021 12:09:49 +0000 (20:09 +0800)
Still put general regs as first alloca order.

gcc/ChangeLog:

PR target/101185
* config/i386/i386.c (x86_order_regs_for_local_alloc):
Revert r12-1669.

gcc/testsuite/ChangeLog

PR target/101185
* gcc.target/i386/bitwise_mask_op-3.c: Add xfail to
temporarily avoid regression, eventually xfail should be
removed.

gcc/config/i386/i386.c
gcc/testsuite/gcc.target/i386/bitwise_mask_op-3.c

index 0d08ba94a8001c467b712c740b2ee453f6458a89..36684c7857c0a556775890b6fa6d6e0bd23f65e8 100644 (file)
@@ -20344,15 +20344,6 @@ x86_order_regs_for_local_alloc (void)
    int pos = 0;
    int i;
 
-   /* When allocano cost of GENERAL_REGS is same as MASK_REGS, allocate
-      MASK_REGS first since it has already been disparaged. This is for
-      testcase bitwise_mask_op3.c where the input is allocated as mask
-      registers, then mask bitwise instructions should be used there.
-      Refer to pr101142.  */
-   /* Mask register.  */
-   for (i = FIRST_MASK_REG; i <= LAST_MASK_REG; i++)
-     reg_alloc_order [pos++] = i;
-
    /* First allocate the local general purpose registers.  */
    for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
      if (GENERAL_REGNO_P (i) && call_used_or_fixed_reg_p (i))
@@ -20379,6 +20370,10 @@ x86_order_regs_for_local_alloc (void)
    for (i = FIRST_EXT_REX_SSE_REG; i <= LAST_EXT_REX_SSE_REG; i++)
      reg_alloc_order [pos++] = i;
 
+   /* Mask register.  */
+   for (i = FIRST_MASK_REG; i <= LAST_MASK_REG; i++)
+     reg_alloc_order [pos++] = i;
+
    /* x87 registers.  */
    if (TARGET_SSE_MATH)
      for (i = FIRST_STACK_REG; i <= LAST_STACK_REG; i++)
index 4a9078615aadf5387edff29eef4e5995ece94e38..352c49d6c6b1d5dbb6d1a827541ca84fe4bfd88a 100644 (file)
@@ -12,7 +12,7 @@ foo_orb (__m512i a, __m512i b)
   foo = m1 | m2;
 }
 
-/* { dg-final { scan-assembler-times "korb\[\t \]" "1" } }  */
+/* { dg-final { scan-assembler-times "korb\[\t \]" "1" { xfail *-*-* } } }  */
 
 void
 foo_xorb (__m512i a, __m512i b)
@@ -22,7 +22,7 @@ foo_xorb (__m512i a, __m512i b)
   foo = m1 ^ m2;
 }
 
-/* { dg-final { scan-assembler-times "kxorb\[\t \]" "1" } }  */
+/* { dg-final { scan-assembler-times "kxorb\[\t \]" "1" { xfail *-*-* } } }  */
 
 void
 foo_andb (__m512i a, __m512i b)
@@ -40,4 +40,4 @@ foo_andnb (__m512i a, __m512i b)
   foo = m1 & ~m2;
 }
 
-/* { dg-final { scan-assembler-times "kmovb\[\t \]" "4"} }  */
+/* { dg-final { scan-assembler-times "kmovb\[\t \]" "4" { xfail *-*-* } } }  */