diff mbox series

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

Message ID 96b978a6-523f-98cd-668f-d28ec1dd0bfa@gmail.com
State New
Headers show
Series [committed] Fix MIPS test after recent match.pd changes | expand

Commit Message

Jeff Law Nov. 18, 2021, 3:48 p.m. UTC
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
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 mbox series

Patch

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)