This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
i386: relax scan-assembler test in lzcnt-1 testcase
- From: Bernd Schmidt <bschmidt at redhat dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 19 Feb 2016 22:36:55 +0100
- Subject: i386: relax scan-assembler test in lzcnt-1 testcase
- Authentication-results: sourceware.org; auth=none
- References: <56C78799 dot 8080206 at t-online dot de>
I'm working on some IRA cost fixes, and I've had the lzcnt-1.c test fail
because the register allocator started making different decisions. In
both cases we end up generating two instructions, but with slightly
different register assignments. Hence, this patch, which relaxes the
test slightly.
Bootstrapped and tested on x86_64-linux (with my IRA changes, so I
probably ought to try without those as well). Ok?
Bernd
* gcc.target/i386/lzcnt-1.c: Allow a different lzcntw output register.
Index: gcc/testsuite/gcc.target/i386/lzcnt-1.c
===================================================================
--- gcc/testsuite/gcc.target/i386/lzcnt-1.c (revision 233451)
+++ gcc/testsuite/gcc.target/i386/lzcnt-1.c (working copy)
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -mlzcnt " } */
-/* { dg-final { scan-assembler "lzcntw\[^\\n]*(%|)ax" } } */
+/* { dg-final { scan-assembler "lzcntw\[^\\n]*(%|)\[ad\]\[xi\]" } } */
#include <x86intrin.h>