On x86, micro architecture selection affects the use of "sub" vs "lea".
The stack-check-11 test was searching for "sub" instructions and of
course failed if the compiler was configured for one of the micro
architecture variants that prefers "lea".
Per HJ's recommendation in the BZ, we can avoid this minor issue by
using -mtune=generic.
Bootstrapped and regression tested on x86. Also verified that the test
now passes when configured with --with-cpu=slm --with-arch=slm
Installed on the trunk.
Jeff
commit 846968c00caa649e3b1270fd8a9500a7082542f4
Author: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Tue Oct 3 17:09:54 2017 +0000
PR target/82358
* gcc.target/i386/stack-check-11.c: Use -mtune=generic.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@253385
138bc75d-0d04-0410-961f-82ee72b054a4
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index e109ea55d55..c5aec6ef564 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2017-10-03 Jeff Law <[email protected]>
+
+ PR target/82358
+ * gcc.target/i386/stack-check-11.c: Use -mtune=generic.
+
2017-10-03 Martin Jambor <[email protected]>
PR tree-optimization/82363
diff --git a/gcc/testsuite/gcc.target/i386/stack-check-11.c
b/gcc/testsuite/gcc.target/i386/stack-check-11.c
index fe5b2c2b844..90ab6023b42 100644
--- a/gcc/testsuite/gcc.target/i386/stack-check-11.c
+++ b/gcc/testsuite/gcc.target/i386/stack-check-11.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fstack-clash-protection" } */
+/* { dg-options "-O2 -fstack-clash-protection -mtune=generic" } */
/* { dg-require-effective-target supports_stack_clash_protection } */
#include <stdint.h>