[Darwin,X86,testsuite] Adjust match string for Darwin popcnt spelling.

Message ID F1E0068B-133F-4B3D-A6A9-9B2A8B7F8737@sandoe.co.uk
State New
Headers show
Series
  • [Darwin,X86,testsuite] Adjust match string for Darwin popcnt spelling.
Related show

Commit Message

Iain Sandoe May 25, 2019, 7:56 p.m.
Darwin uses a different spelling for popcnt (popcnt instead of popcntw).
Check for this in the test.

tested on x86_64-darwin16 and x86_64-linux-gnu (--target_board=unix\{-m32,-m64\}\{,-fpic\})
aplied to mainline,
thanks
Iain

2019-05-25  Iain Sandoe  <iain@sandoe.co.uk>

	* gcc.target/i386/pr59874-3.c: Use the spelling of popcnt
	expected for Darwin.

Patch

diff --git a/gcc/testsuite/gcc.target/i386/pr59874-3.c b/gcc/testsuite/gcc.target/i386/pr59874-3.c
index ec55a12..0332f04 100644
--- a/gcc/testsuite/gcc.target/i386/pr59874-3.c
+++ b/gcc/testsuite/gcc.target/i386/pr59874-3.c
@@ -1,7 +1,8 @@ 
 /* PR target/59874 */
 /* { dg-do compile } */
 /* { dg-options "-O2 -mpopcnt -masm=att" } */
-/* { dg-final { scan-assembler "popcntw" } } */
+/* { dg-final { scan-assembler "\tpopcntw" { target { ! *-*-darwin* } } } } */
+/* { dg-final { scan-assembler "\tpopcnt" { target *-*-darwin* } } } */
 
 unsigned int
 foo (unsigned short x)