Hi!

The following patch adjusts the pr49095.c testcase, so that it counts only
the loads through the first argument of the function and thus doesn't care
how many spill/fills are done using stack saves/loads vs. pushes.

Regtested on x86_64-linux and i686-linux, ok for trunk?

2019-03-29  Jakub Jelinek  <ja...@redhat.com>

        PR rtl-optimization/89865
        * gcc.target/i386/pr49095.c: Include in scan-assembler-times patterns
        the first argument register, so that occassional spills/fills are
        ignored.

--- gcc/testsuite/gcc.target/i386/pr49095.c.jj  2018-10-08 15:18:22.074105125 
+0200
+++ gcc/testsuite/gcc.target/i386/pr49095.c     2019-03-29 13:11:54.941597147 
+0100
@@ -73,5 +73,5 @@ G (long)
 /* { dg-final { scan-assembler-not "test\[lq\]" } } */
 /* The {f,h}{char,short,int,long}xor functions aren't optimized into
    a RMW instruction, so need load, modify and store.  FIXME eventually.  */
-/* { dg-final { scan-assembler-times "\\), %" 57 { target { ia32 } } } } */
-/* { dg-final { scan-assembler-times "\\), %" 45 { target { ! ia32 } } } } */
+/* { dg-final { scan-assembler-times "\\(%eax\\), %" 12 { target { ia32 } } } 
} */
+/* { dg-final { scan-assembler-times "\\(%\[re\]di\\), %" 8 { target { ! ia32 
} } } } */

        Jakub

Reply via email to