[committed] Fix MIPS test after recent match.pd changes

Jeff Law jeffreyalaw@gmail.com
Thu Nov 18 15:48:59 GMT 2021


Andrew's recent match.pd improvements resulted in octeon-bbit-1 failing 
on the MIPS platforms.

What's going on is pretty simple.  We've got two functions that collapse 
into the same code after Andrew's change which causes ICF to kick in.  
As a result we don't see as many bbit instructions as we expect, thus 
the failures.

We can restore the test by adding the noipa attribute.

Committed to the trunk,
Jeff
-------------- next part --------------
commit 16fab6d691b1410abdf794230246ab9753d183af
Author: Jeff Law <jeffreyalaw@gmail.com>
Date:   Thu Nov 18 10:47:21 2021 -0500

    Fix MIPS test after recent match.pd changes
    
    gcc/testsuite
            * gcc.target/mips/octeon-bbit-1.c (f3): Add noipa attribute.

diff --git a/gcc/testsuite/gcc.target/mips/octeon-bbit-1.c b/gcc/testsuite/gcc.target/mips/octeon-bbit-1.c
index f91c68bcdcc..8adbb26e377 100644
--- a/gcc/testsuite/gcc.target/mips/octeon-bbit-1.c
+++ b/gcc/testsuite/gcc.target/mips/octeon-bbit-1.c
@@ -22,7 +22,9 @@ f2 (int i)
     foo ();
 }
 
-NOMIPS16 void
+/* f3 and f4 are equivalent and may be subject to ICF.  The attribute
+   is supposed to prevent that.  */
+NOMIPS16 void __attribute__ ((noipa))
 f3 (int i)
 {
   if (i % 2)


More information about the Gcc-patches mailing list