aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/i386')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx-pr57233.c16
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-pr57233.c16
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpaddb-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpaddw-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpmullw-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsraw-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsrlw-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsubb-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsubw-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/avx512f-pr57233.c16
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-andn-1a.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-andn-2a.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-bextr-1a.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-bextr-2a.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsi-1a.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsi-2a.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsmsk-1a.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsmsk-2a.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsr-1a.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsr-2a.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-tzcnt-1a.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-tzcnt-2a.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-bzhi32-1a.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-bzhi64-1a.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-pdep32-1a.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-pdep64-1a.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-pext32-1a.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-pext64-1a.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/cadd.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/clearcap.map3
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/clearcapv2.map7
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/i386.exp36
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-1.c23
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-2.c21
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-3.c21
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-4.c22
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-5.c22
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-6.c15
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-7.c15
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-8.c29
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-force-no-patching.c27
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-force-patching.c20
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-sibling-call.c26
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pie-copyrelocs-1.c13
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pie-copyrelocs-2.c13
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pr50038.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pr57233.c15
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pr60868.c10
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pr60901.c17
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pr60902.c32
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pr60909-1.c11
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pr60909-2.c11
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pr61423.c38
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pr61446.c14
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pr61599-1.c13
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/pr61599-2.c13
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/recip-vec-sqrtf-avx.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/sse2-pr57233.c16
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/sse2-unaligned-mov.c20
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/sse4_1-roundss-1.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/sse4_1-roundss-2.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/sse4_1-roundss-3.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/vec-may_alias.c25
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/wmul-1.c2
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/xop-pr57233.c16
65 files changed, 601 insertions, 75 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/avx-pr57233.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/avx-pr57233.c
new file mode 100644
index 000000000..ffc71d908
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/avx-pr57233.c
@@ -0,0 +1,16 @@
+/* PR tree-optimization/57233 */
+/* { dg-do run { target avx } } */
+/* { dg-options "-O2 -mavx" } */
+
+#include "avx-check.h"
+
+static void
+avx_test (void)
+{
+ do_main ();
+}
+
+#undef main
+#define main() do_main ()
+
+#include "../../gcc.dg/pr57233.c"
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-pr57233.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-pr57233.c
new file mode 100644
index 000000000..3fb2608ab
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-pr57233.c
@@ -0,0 +1,16 @@
+/* PR tree-optimization/57233 */
+/* { dg-do run { target avx2 } } */
+/* { dg-options "-O2 -mavx2" } */
+
+#include "avx2-check.h"
+
+static void
+avx2_test (void)
+{
+ do_main ();
+}
+
+#undef main
+#define main() do_main ()
+
+#include "../../gcc.dg/pr57233.c"
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpaddb-3.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpaddb-3.c
index ee1f31356..4b249c3fb 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpaddb-3.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpaddb-3.c
@@ -8,5 +8,5 @@
#include "avx2-vpop-check.h"
-/* { dg-final { scan-assembler-times "vpaddb\[ \\t\]+\[^\n\]*%ymm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler "vpaddb\[ \\t\]+\[^\n\]*%ymm\[0-9\]" } } */
/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpaddw-3.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpaddw-3.c
index 7e7e018c1..889bd9f37 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpaddw-3.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpaddw-3.c
@@ -8,5 +8,5 @@
#include "avx2-vpop-check.h"
-/* { dg-final { scan-assembler-times "vpaddw\[ \\t\]+\[^\n\]*%ymm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler "vpaddw\[ \\t\]+\[^\n\]*%ymm\[0-9\]" } } */
/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpmullw-3.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpmullw-3.c
index 4d61d7a9f..c54084301 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpmullw-3.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpmullw-3.c
@@ -8,5 +8,5 @@
#include "avx2-vpop-check.h"
-/* { dg-final { scan-assembler-times "vpmullw\[ \\t\]+\[^\n\]*%ymm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler "vpmullw\[ \\t\]+\[^\n\]*%ymm\[0-9\]" } } */
/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsraw-3.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsraw-3.c
index 70bd5cd6b..e360fde0f 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsraw-3.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsraw-3.c
@@ -8,5 +8,5 @@
#include "avx2-vpop-check.h"
-/* { dg-final { scan-assembler-times "vpsraw\[ \\t\]+\[^\n\]*%ymm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler "vpsraw\[ \\t\]+\[^\n\]*%ymm\[0-9\]" } } */
/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsrlw-3.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsrlw-3.c
index 691e02f3f..761ad8a24 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsrlw-3.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsrlw-3.c
@@ -8,5 +8,5 @@
#include "avx2-vpop-check.h"
-/* { dg-final { scan-assembler-times "vpsrlw\[ \\t\]+\[^\n\]*%ymm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler "vpsrlw\[ \\t\]+\[^\n\]*%ymm\[0-9\]" } } */
/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsubb-3.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsubb-3.c
index 45527f524..c4eeff9d5 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsubb-3.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsubb-3.c
@@ -8,5 +8,5 @@
#include "avx2-vpop-check.h"
-/* { dg-final { scan-assembler-times "vpsubb\[ \\t\]+\[^\n\]*%ymm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler "vpsubb\[ \\t\]+\[^\n\]*%ymm\[0-9\]" } } */
/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsubw-3.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsubw-3.c
index 404c2eea9..dc0d937d6 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsubw-3.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/avx2-vpsubw-3.c
@@ -8,5 +8,5 @@
#include "avx2-vpop-check.h"
-/* { dg-final { scan-assembler-times "vpsubw\[ \\t\]+\[^\n\]*%ymm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler "vpsubw\[ \\t\]+\[^\n\]*%ymm\[0-9\]" } } */
/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/avx512f-pr57233.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/avx512f-pr57233.c
new file mode 100644
index 000000000..2f1c23a15
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/avx512f-pr57233.c
@@ -0,0 +1,16 @@
+/* PR tree-optimization/57233 */
+/* { dg-do run { target avx512f } } */
+/* { dg-options "-O2 -mavx512f" } */
+
+#include "avx512f-check.h"
+
+static void
+avx512f_test (void)
+{
+ do_main ();
+}
+
+#undef main
+#define main() do_main ()
+
+#include "../../gcc.dg/pr57233.c"
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-andn-1a.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-andn-1a.c
index a7ee07653..6a0fe15c8 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-andn-1a.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-andn-1a.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -mbmi -fno-inline -dp" } */
+/* { dg-options "-O2 -mbmi -fno-inline -dp --param max-default-completely-peeled-insns=0" } */
#include "bmi-andn-1.c"
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-andn-2a.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-andn-2a.c
index 72fe02639..c7a895cdc 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-andn-2a.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-andn-2a.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mbmi -fno-inline -dp" } */
+/* { dg-options "-O2 -mbmi -fno-inline -dp --param max-default-completely-peeled-insns=0" } */
#include "bmi-andn-2.c"
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-bextr-1a.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-bextr-1a.c
index 4ccfbdc98..8dbf1eb72 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-bextr-1a.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-bextr-1a.c
@@ -3,4 +3,4 @@
#include "bmi-bextr-1.c"
-/* { dg-final { scan-assembler-times "bmi_bextr_di" 1 } } */
+/* { dg-final { scan-assembler "bmi_bextr_di" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-bextr-2a.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-bextr-2a.c
index 282a3e400..da476106d 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-bextr-2a.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-bextr-2a.c
@@ -3,4 +3,4 @@
#include "bmi-bextr-2.c"
-/* { dg-final { scan-assembler-times "bmi_bextr_si" 1 } } */
+/* { dg-final { scan-assembler "bmi_bextr_si" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsi-1a.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsi-1a.c
index e9e0ecb67..ab5257143 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsi-1a.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsi-1a.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -mbmi -fno-inline -dp" } */
+/* { dg-options "-O2 -mbmi -fno-inline -dp --param max-default-completely-peeled-insns=0" } */
#include "bmi-blsi-1.c"
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsi-2a.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsi-2a.c
index be9ca3f63..ccca576f6 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsi-2a.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsi-2a.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mbmi -fno-inline -dp" } */
+/* { dg-options "-O2 -mbmi -fno-inline -dp --param max-default-completely-peeled-insns=0" } */
#include "bmi-blsi-2.c"
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsmsk-1a.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsmsk-1a.c
index 4e6cb7b36..c75f33c48 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsmsk-1a.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsmsk-1a.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -mbmi -fno-inline -dp" } */
+/* { dg-options "-O2 -mbmi -fno-inline -dp --param max-default-completely-peeled-insns=0" } */
#include "bmi-blsmsk-1.c"
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsmsk-2a.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsmsk-2a.c
index f6f6babff..7d3597d39 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsmsk-2a.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsmsk-2a.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mbmi -fno-inline -dp" } */
+/* { dg-options "-O2 -mbmi -fno-inline -dp --param max-default-completely-peeled-insns=0" } */
#include "bmi-blsmsk-2.c"
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsr-1a.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsr-1a.c
index 79241ca8f..736997dd8 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsr-1a.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsr-1a.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -mbmi -fno-inline -dp" } */
+/* { dg-options "-O2 -mbmi -fno-inline -dp --param max-default-completely-peeled-insns=0" } */
#include "bmi-blsr-1.c"
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsr-2a.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsr-2a.c
index d88c16e4d..6f6b67fd6 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsr-2a.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-blsr-2a.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mbmi -fno-inline -dp" } */
+/* { dg-options "-O2 -mbmi -fno-inline -dp --param max-default-completely-peeled-insns=0" } */
#include "bmi-blsr-2.c"
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-tzcnt-1a.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-tzcnt-1a.c
index e283c3154..cd469a791 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-tzcnt-1a.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-tzcnt-1a.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-O2 -mbmi -fno-inline" } */
+/* { dg-options "-O2 -mbmi -fno-inline --param max-default-completely-peeled-insns=0" } */
#include "bmi-tzcnt-1.c"
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-tzcnt-2a.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-tzcnt-2a.c
index 2cdb3f443..b60a5a15b 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-tzcnt-2a.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi-tzcnt-2a.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mbmi -fno-inline" } */
+/* { dg-options "-O2 -mbmi -fno-inline --param max-default-completely-peeled-insns=0" } */
#include "bmi-tzcnt-2.c"
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-bzhi32-1a.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-bzhi32-1a.c
index 05be7a837..64be3bafa 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-bzhi32-1a.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-bzhi32-1a.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-mbmi2 -O2 -dp" } */
+/* { dg-options "-mbmi2 -O2 -dp --param max-default-completely-peeled-insns=0" } */
#include "bmi2-bzhi32-1.c"
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-bzhi64-1a.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-bzhi64-1a.c
index dc4a94cc3..08fee200e 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-bzhi64-1a.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-bzhi64-1a.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! ia32 } } } */
-/* { dg-options "-mbmi2 -O2 -dp" } */
+/* { dg-options "-mbmi2 -O2 -dp --param max-default-completely-peeled-insns=0" } */
#include "bmi2-bzhi64-1.c"
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-pdep32-1a.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-pdep32-1a.c
index 87888fcff..7e528985e 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-pdep32-1a.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-pdep32-1a.c
@@ -3,4 +3,4 @@
#include "bmi2-pdep32-1.c"
-/* { dg-final { scan-assembler-times "bmi2_pdep_si3" 1 } } */
+/* { dg-final { scan-assembler "bmi2_pdep_si3" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-pdep64-1a.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-pdep64-1a.c
index 8163c4062..24238ca21 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-pdep64-1a.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-pdep64-1a.c
@@ -3,4 +3,4 @@
#include "bmi2-pdep64-1.c"
-/* { dg-final { scan-assembler-times "bmi2_pdep_di3" 1 } } */
+/* { dg-final { scan-assembler "bmi2_pdep_di3" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-pext32-1a.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-pext32-1a.c
index c4a6deeca..5d908b37d 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-pext32-1a.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-pext32-1a.c
@@ -3,4 +3,4 @@
#include "bmi2-pext32-1.c"
-/* { dg-final { scan-assembler-times "bmi2_pext_si3" 1 } } */
+/* { dg-final { scan-assembler "bmi2_pext_si3" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-pext64-1a.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-pext64-1a.c
index aaf06c1f2..c4fb99c85 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-pext64-1a.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/bmi2-pext64-1a.c
@@ -3,4 +3,4 @@
#include "bmi2-pext64-1.c"
-/* { dg-final { scan-assembler-times "bmi2_pext_di3" 1 } } */
+/* { dg-final { scan-assembler "bmi2_pext_di3" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/cadd.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/cadd.c
index 7a39c67ed..32036e1a5 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/cadd.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/cadd.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=k8" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize -march=k8" } */
/* { dg-final { scan-assembler "sbb" } } */
extern void abort (void);
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/clearcap.map b/gcc-4.9/gcc/testsuite/gcc.target/i386/clearcap.map
deleted file mode 100644
index 147f922d1..000000000
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/clearcap.map
+++ /dev/null
@@ -1,3 +0,0 @@
-# clear all hardware capabilities emitted by Sun as: the tests here
-# guard against execution at runtime
-hwcap_1 = V0x0 OVERRIDE;
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/clearcapv2.map b/gcc-4.9/gcc/testsuite/gcc.target/i386/clearcapv2.map
deleted file mode 100644
index 95cb14cc5..000000000
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/clearcapv2.map
+++ /dev/null
@@ -1,7 +0,0 @@
-# clear all hardware capabilities emitted by Sun as: the tests here
-# guard against execution at runtime
-# uses mapfile v2 syntax which is the only way to clear AT_SUN_CAP_HW2 flags
-$mapfile_version 2
-CAPABILITY {
- HW = ;
-};
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/i386.exp b/gcc-4.9/gcc/testsuite/gcc.target/i386/i386.exp
index 080e302b7..d9b36cd30 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/i386.exp
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/i386.exp
@@ -23,6 +23,7 @@ if { ![istarget i?86*-*-*] && ![istarget x86_64-*-*] } then {
# Load support procs.
load_lib gcc-dg.exp
+load_lib clearcap.exp
# Return 1 if attribute ms_hook_prologue is supported.
proc check_effective_target_ms_hook_prologue { } {
@@ -307,39 +308,6 @@ proc check_effective_target_sha { } {
} "-O2 -msha" ]
}
-# If the linker used understands -M <mapfile>, pass it to clear hardware
-# capabilities set by the Sun assembler.
-# Try mapfile syntax v2 first which is the only way to clear hwcap_2 flags.
-set clearcap_ldflags "-Wl,-M,$srcdir/$subdir/clearcapv2.map"
-
-if ![check_no_compiler_messages mapfilev2 executable {
- int main (void) { return 0; }
-} $clearcap_ldflags ] {
- # If this doesn't work, fall back to the less capable v1 syntax.
- set clearcap_ldflags "-Wl,-M,$srcdir/$subdir/clearcap.map"
-
- if ![check_no_compiler_messages mapfile executable {
- int main (void) { return 0; }
- } $clearcap_ldflags ] {
- unset clearcap_ldflags
- }
-}
-
-if [info exists clearcap_ldflags] {
- if { [info procs gcc_target_compile] != [list] \
- && [info procs saved_gcc_target_compile] == [list] } {
- rename gcc_target_compile saved_gcc_target_compile
-
- proc gcc_target_compile { source dest type options } {
- global clearcap_ldflags
- # Always pass -Wl,-M,<mapfile>, but don't let it show up in gcc.sum.
- lappend options "additional_flags=$clearcap_ldflags"
-
- return [saved_gcc_target_compile $source $dest $type $options]
- }
- }
-}
-
# If a testcase doesn't have special options, use these.
global DEFAULT_CFLAGS
if ![info exists DEFAULT_CFLAGS] then {
@@ -348,6 +316,7 @@ if ![info exists DEFAULT_CFLAGS] then {
# Initialize `dg'.
dg-init
+clearcap-init
# Special case compilation of vect-args.c so we don't have to
# replicate it 10 times.
@@ -367,4 +336,5 @@ set tests [prune $tests $srcdir/$subdir/vect-args.c]
dg-runtest $tests "" $DEFAULT_CFLAGS
# All done.
+clearcap-finish
dg-finish
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-1.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-1.c
new file mode 100644
index 000000000..aa1f424c8
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-1.c
@@ -0,0 +1,23 @@
+/* Verify -mpatch-functions-for-instrumentation works. */
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-mpatch-functions-for-instrumentation" } */
+
+/* Check nop-bytes at beginning. */
+/* { dg-final { scan-assembler ".byte\t0xeb,0x09(.*).byte\t0x90" } } */
+/* Check nop-bytes at end. */
+/* { dg-final { scan-assembler "ret(.*).byte\t0x90(.*).byte\t0x90" } } */
+
+__attribute__ ((noinline))
+void foo()
+{
+ /* Dummy loop. */
+ int x = 0;
+ while (++x);
+}
+
+int main()
+{
+ foo();
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-2.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-2.c
new file mode 100644
index 000000000..78de86763
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-2.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-mpatch-functions-for-instrumentation -mno-patch-functions-main-always" } */
+
+/* Function is small to be instrumented with default values. Check there
+ aren't any nop-bytes at beginning or end of function. */
+
+/* { dg-final { scan-assembler-not ".byte\t0xeb,0x09(.*).byte\t0x90" } } */
+/* { dg-final { scan-assembler-not "ret(.*).byte\t0x90(.*).byte\t0x90" } } */
+
+__attribute__ ((noinline))
+void foo()
+{
+ int x = 0;
+}
+
+int main()
+{
+ foo();
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-3.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-3.c
new file mode 100644
index 000000000..9e8eb52ae
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-3.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-mpatch-functions-for-instrumentation --param function-patch-min-instructions=0" } */
+
+/* Function should have nop-bytes with -mpatch-function-min-instructions=0.
+ Check there are nop-bytes at beginning and end of function. */
+
+/* { dg-final { scan-assembler ".byte\t0xeb,0x09(.*).byte\t0x90" } } */
+/* { dg-final { scan-assembler "ret(.*).byte\t0x90(.*).byte\t0x90" } } */
+
+__attribute__ ((noinline))
+void foo()
+{
+ int x = 0;
+}
+
+int main()
+{
+ foo();
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-4.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-4.c
new file mode 100644
index 000000000..7a031d796
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-4.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-mpatch-functions-for-instrumentation -mpatch-functions-ignore-loops -mno-patch-functions-main-always" } */
+
+/* Function is too small to be patched when ignoring the loop.
+ Check there aren't any nop-bytes at beginning and end of function. */
+
+/* { dg-final { scan-assembler-not ".byte\t0xeb,0x09(.*).byte\t0x90" } } */
+/* { dg-final { scan-assembler-not "ret(.*).byte\t0x90(.*).byte\t0x90" } } */
+
+__attribute__ ((noinline))
+void foo()
+{
+ int x = 0;
+ while (++x);
+}
+
+int main()
+{
+ foo();
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-5.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-5.c
new file mode 100644
index 000000000..cd6a014cd
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-5.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-mpatch-functions-for-instrumentation -mpatch-functions-ignore-loops --param function-patch-min-instructions=0" } */
+
+/* Function should be patched with nop bytes with given options.
+ Check there are nop-bytes at beginning and end of function. */
+
+/* { dg-final { scan-assembler ".byte\t0xeb,0x09(.*).byte\t0x90" } } */
+/* { dg-final { scan-assembler "ret(.*).byte\t0x90(.*).byte\t0x90" } } */
+
+__attribute__ ((noinline))
+void foo()
+{
+ int x = 0;
+ while (++x);
+}
+
+int main()
+{
+ foo();
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-6.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-6.c
new file mode 100644
index 000000000..c1d644686
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-6.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-mpatch-functions-for-instrumentation" } */
+
+/* 'main' function should always be patched, irrespective of how small it is.
+ Check there are nop-bytes at beginning and end of main. */
+
+/* { dg-final { scan-assembler ".byte\t0xeb,0x09(.*).byte\t0x90" } } */
+/* { dg-final { scan-assembler "ret(.*).byte\t0x90(.*).byte\t0x90" } } */
+
+int main()
+{
+ int x = 0;
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-7.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-7.c
new file mode 100644
index 000000000..f625298d6
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-7.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-mpatch-functions-for-instrumentation -mno-patch-functions-main-always" } */
+
+/* 'main' shouldn't be patched with the option -mno-patch-functions-main-always.
+ Check there aren't any nop-bytes at beginning and end of main. */
+
+/* { dg-final { scan-assembler-not ".byte\t0xeb,0x09(.*).byte\t0x90" } } */
+/* { dg-final { scan-assembler-not "ret(.*).byte\t0x90(.*).byte\t0x90" } } */
+
+int main()
+{
+ int x = 0;
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-8.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-8.c
new file mode 100644
index 000000000..436379cb2
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-8.c
@@ -0,0 +1,29 @@
+/* Verify -mpatch-functions-for-instrumentation works. */
+/* { dg-do run } */
+/* { dg-require-effective-target lp64 } */
+
+/* -O2 forces a sibling call for foo from bar. */
+/* { dg-options "-O2 -mpatch-functions-for-instrumentation --param function-patch-min-instructions=0" } */
+
+__attribute__ ((noinline))
+int foo()
+{
+ /* Dummy loop. */
+ int x = 10;
+ int y = 100;
+ while (--x)
+ ++y;
+ return y;
+}
+
+__attribute__ ((noinline))
+int bar()
+{
+ return foo();
+}
+
+int main()
+{
+ bar();
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-force-no-patching.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-force-no-patching.c
new file mode 100644
index 000000000..cad6f2da6
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-force-no-patching.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-mpatch-functions-for-instrumentation -mno-patch-functions-main-always" } */
+
+/* Even complicated functions shouldn't get patched if they have the
+ never_patch_for_instrumentation attribute. */
+
+/* { dg-final { scan-assembler-not ".byte\t0xeb,0x09(.*).byte\t0x90" } } */
+/* { dg-final { scan-assembler-not "ret(.*).byte\t0x90(.*).byte\t0x90" } } */
+
+__attribute__ ((never_patch_for_instrumentation))
+int foo () {
+ volatile unsigned x = 0;
+ volatile unsigned y = 1;
+ x += y;
+ x *= y;
+ while (++x)
+ foo ();
+ return y;
+}
+
+
+int main ()
+{
+ int x = 0;
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-force-patching.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-force-patching.c
new file mode 100644
index 000000000..86ad1594c
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-force-patching.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O3 -mpatch-functions-for-instrumentation -mno-patch-functions-main-always" } */
+
+/* Functions which have the always_patch attribute should be patched no matter
+ what. Check that there are nop-bytes at the beginning and end of the
+ function. We add -O3 so that the compiler will try to inline foo (but it
+ will be blocked by the attribute). */
+
+/* { dg-final { scan-assembler ".byte\t0xeb,0x09(.*).byte\t0x90" } } */
+/* { dg-final { scan-assembler "ret(.*).byte\t0x90(.*).byte\t0x90" } } */
+
+__attribute__ ((always_patch_for_instrumentation))
+static int foo () {
+ return 3;
+}
+
+int main () {
+ volatile int x = foo ();
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-sibling-call.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-sibling-call.c
new file mode 100644
index 000000000..847a95ce6
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/patch-functions-sibling-call.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* -O2 forces a sibling call. */
+/* { dg-options "-O2 -mpatch-functions-for-instrumentation" } */
+
+/* { dg-final { scan-assembler ".byte\t0xeb,0x09(.*).byte\t0x90" } } */
+
+/* Checks correct nop-bytes are generated just before a sibling call. */
+/* { dg-final { scan-assembler ".byte\t0xeb,0x09(.*).byte\t0x90(.*)jmp" } } */
+
+/* Not instrumented as function has no loop and is small. */
+__attribute__ ((noinline))
+int foo(int n)
+{
+ int x = 0;
+ return n + 10;
+}
+
+__attribute__ ((noinline))
+int bar(int n)
+{
+ /* Dummy loop. */
+ while (--n)
+ n = n * 2;
+ return foo(n);
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/pie-copyrelocs-1.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/pie-copyrelocs-1.c
new file mode 100644
index 000000000..ae339bd9e
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/pie-copyrelocs-1.c
@@ -0,0 +1,13 @@
+/* Test if -mcopyrelocs does the right thing. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fpie -mcopyrelocs" } */
+
+extern int glob_a;
+
+int foo ()
+{
+ return glob_a;
+}
+
+/* glob_a should never be accessed with a GOTPCREL */
+/* { dg-final { scan-assembler-not "glob_a\\@GOTPCREL" { target { x86_64-*-* } } } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/pie-copyrelocs-2.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/pie-copyrelocs-2.c
new file mode 100644
index 000000000..ed60d0329
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/pie-copyrelocs-2.c
@@ -0,0 +1,13 @@
+/* Test if -mno-copyrelocs does the right thing. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fpie -mno-copyrelocs" } */
+
+extern int glob_a;
+
+int foo ()
+{
+ return glob_a;
+}
+
+/* glob_a should always be accessed via GOT */
+/* { dg-final { scan-assembler "glob_a\\@GOT" { target { x86_64-*-* } } } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/pr50038.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr50038.c
index e111574c4..8ec601dcb 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/pr50038.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr50038.c
@@ -1,5 +1,5 @@
/* PR target/50038 */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize" } */
void
test (int len, unsigned char *in, unsigned char *out)
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/pr57233.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr57233.c
new file mode 100644
index 000000000..34182fa7d
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr57233.c
@@ -0,0 +1,15 @@
+/* PR tree-optimization/57233 */
+/* { dg-do compile { target avx } } */
+/* { dg-options "-O2 -mavx -mno-xop" } */
+
+typedef unsigned V4 __attribute__((vector_size(4 * sizeof (int))));
+V4 a;
+
+__attribute__((noinline)) void
+foo (void)
+{
+ a = (a << 2) | (a >> 30);
+}
+
+/* { dg-final { scan-assembler "vpsrld\[^\n\r]*30" } } */
+/* { dg-final { scan-assembler "vpslld\[^\n\r]*2" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/pr60868.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr60868.c
new file mode 100644
index 000000000..c30bbfc18
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr60868.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O0 -minline-all-stringops -minline-stringops-dynamically -march=core2" } */
+
+void bar (float *);
+
+void foo (void)
+{
+ float b[256] = {0};
+ bar(b);
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/pr60901.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr60901.c
new file mode 100644
index 000000000..f0f25a1dc
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr60901.c
@@ -0,0 +1,17 @@
+/* { dg-options "-O -fselective-scheduling -fschedule-insns -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fno-tree-dominator-opts" } */
+
+extern int n;
+extern void bar (void);
+extern int baz (int);
+
+void
+foo (void)
+{
+ int i, j;
+ for (j = 0; j < n; j++)
+ {
+ for (i = 1; i < j; i++)
+ bar ();
+ baz (0);
+ }
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/pr60902.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr60902.c
new file mode 100644
index 000000000..b81dcd76f
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr60902.c
@@ -0,0 +1,32 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+extern void abort ();
+extern void exit (int);
+
+int x;
+
+foo()
+{
+ static int count;
+ count++;
+ if (count > 1)
+ abort ();
+}
+
+static inline int
+frob ()
+{
+ int a;
+ __asm__ ("mov %1, %0\n\t" : "=r" (a) : "m" (x));
+ x++;
+ return a;
+}
+
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 10 && frob () == 0; i++)
+ foo();
+ exit (0);
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/pr60909-1.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr60909-1.c
new file mode 100644
index 000000000..5a1ac3c0f
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr60909-1.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-mrdrnd" } */
+
+extern void bar (int);
+
+void
+foo (unsigned *u)
+{
+ int i = __builtin_ia32_rdrand32_step (u);
+ bar (i);
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/pr60909-2.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr60909-2.c
new file mode 100644
index 000000000..dd356685b
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr60909-2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-mrdseed" } */
+
+extern void bar (int);
+
+void
+foo (unsigned *u)
+{
+ int i = __builtin_ia32_rdseed_si_step (u);
+ bar (i);
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/pr61423.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr61423.c
new file mode 100644
index 000000000..5b538a265
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr61423.c
@@ -0,0 +1,38 @@
+/* PR target/61423 */
+/* { dg-do run { target ia32 } } */
+/* { dg-options "-O1 -ftree-vectorize -msse2 -mfpmath=387 -mtune=core2" } */
+
+#define N 1024
+static unsigned int A[N];
+
+double
+__attribute__((noinline))
+func (void)
+{
+ unsigned int sum = 0;
+ unsigned i;
+ double t;
+
+ for (i = 0; i < N; i++)
+ sum += A[i];
+
+ t = sum;
+ return t;
+}
+
+int
+main ()
+{
+ unsigned i;
+ double d;
+
+ for(i = 0; i < N; i++)
+ A[i] = 1;
+
+ d = func();
+
+ if (d != 1024.0)
+ __builtin_abort ();
+
+ return 0;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/pr61446.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr61446.c
new file mode 100644
index 000000000..fc32f63ee
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr61446.c
@@ -0,0 +1,14 @@
+/* PR rtl-optimization/61446 */
+
+/* { dg-do compile { target { ia32 } } } */
+/* { dg-options "-O2 -march=corei7 -mfpmath=387" } */
+
+unsigned long long
+foo (float a)
+{
+ const double dfa = a;
+ const unsigned int hi = dfa / 0x1p32f;
+ const unsigned int lo = dfa - (double) hi * 0x1p32f;
+
+ return ((unsigned long long) hi << (4 * (8))) | lo;
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/pr61599-1.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr61599-1.c
new file mode 100644
index 000000000..4eec99253
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr61599-1.c
@@ -0,0 +1,13 @@
+/* PR target/61599 */
+/* { dg-options "-mcmodel=medium -fdata-sections" { target lp64 } } */
+/* { dg-do compile { target lp64 } } */
+
+char a[1*1024*1024*1024];
+char b[1*1024*1024*1024];
+char c[1*1024*1024*1024];
+
+extern int bar();
+int main()
+{
+ return bar() + c[225];
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/pr61599-2.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr61599-2.c
new file mode 100644
index 000000000..22a53a45d
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/pr61599-2.c
@@ -0,0 +1,13 @@
+/* PR target/61599 */
+/* With -mcmodel=medium, all the arrays will be treated as large data. */
+/* { dg-options "-mcmodel=medium -fdata-sections" { target lp64 } } */
+/* { dg-do compile { target lp64 } } */
+
+extern char a[];
+extern char b[];
+extern char c[];
+
+int bar()
+{
+ return a[2] + b[16] + c[256];
+}
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/recip-vec-sqrtf-avx.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/recip-vec-sqrtf-avx.c
index 9cf3cc81b..efc73f91c 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/recip-vec-sqrtf-avx.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/recip-vec-sqrtf-avx.c
@@ -31,4 +31,4 @@ void t3(void)
r[i] = sqrtf (a[i]);
}
-/* { dg-final { scan-assembler-times "vrsqrtps\[ \\t\]+\[^\n\]*%ymm" 3 } } */
+/* { dg-final { scan-assembler "vrsqrtps\[ \\t\]+\[^\n\]*%ymm" } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/sse2-pr57233.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/sse2-pr57233.c
new file mode 100644
index 000000000..8a3bb2fc5
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/sse2-pr57233.c
@@ -0,0 +1,16 @@
+/* PR tree-optimization/57233 */
+/* { dg-do run { target sse2 } } */
+/* { dg-options "-O2 -msse2" } */
+
+#include "sse2-check.h"
+
+static void
+sse2_test (void)
+{
+ do_main ();
+}
+
+#undef main
+#define main() do_main ()
+
+#include "../../gcc.dg/pr57233.c"
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/sse2-unaligned-mov.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/sse2-unaligned-mov.c
new file mode 100644
index 000000000..28470cec4
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/sse2-unaligned-mov.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-mtune=corei7 -O2" } */
+
+#include <emmintrin.h>
+
+double a[1000];
+
+__m128d foo1() {
+ __m128d res;
+ res = _mm_load_sd(&a[1]);
+ res = _mm_loadh_pd(res, &a[2]);
+ return res;
+}
+
+void foo2(__m128d res) {
+ _mm_store_sd(&a[1], res);
+ _mm_storeh_pd(&a[2], res);
+}
+
+/* { dg-final { scan-assembler-times "movup" 2 } } */
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/sse4_1-roundss-1.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/sse4_1-roundss-1.c
index 96dd8a6a7..fc92e6824 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/sse4_1-roundss-1.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/sse4_1-roundss-1.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target sse4 } */
-/* { dg-options "-O2 -msse4.1" } */
+/* { dg-options "-O2 -msse4.1 --param max-default-completely-peeled-insns=0" } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
#include "sse4_1-check.h"
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/sse4_1-roundss-2.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/sse4_1-roundss-2.c
index f052c029f..72e6807fe 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/sse4_1-roundss-2.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/sse4_1-roundss-2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target sse4 } */
-/* { dg-options "-O2 -msse4.1" } */
+/* { dg-options "-O2 -msse4.1 --param max-default-completely-peeled-insns=0" } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
#include "sse4_1-check.h"
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/sse4_1-roundss-3.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/sse4_1-roundss-3.c
index 0a696b1cf..0af7ea783 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/sse4_1-roundss-3.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/sse4_1-roundss-3.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-require-effective-target sse4 } */
-/* { dg-options "-O2 -msse4.1" } */
+/* { dg-options "-O2 -msse4.1 --param max-default-completely-peeled-insns=0" } */
/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
#include "sse4_1-check.h"
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/vec-may_alias.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/vec-may_alias.c
new file mode 100644
index 000000000..e97049745
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/vec-may_alias.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -w -Wno-abi" } */
+
+typedef int v2si __attribute__ ((vector_size (8)));
+typedef short v4hi __attribute__ ((vector_size (8)));
+typedef short v4hia __attribute__ ((vector_size (8), may_alias));
+
+__attribute__ ((noinline, noclone))
+int f (v2si A, int N)
+{ return ((v4hia)A)[N]; }
+
+__attribute__ ((noinline, noclone))
+int g (v2si A, int N)
+{ return ((v4hi)A)[N]; }
+
+int main()
+{
+ v2si x = { 0, 0 }, y = { 1, 1 };
+ if (f (x, 0) || f (x, 1) || f (x, 2) || f (x, 3))
+ __builtin_abort ();
+ if (g (y, 0) != 1 || g (y, 1) || g (y, 2) != 1 || g (y, 3))
+ __builtin_abort ();
+ return 0;
+}
+
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/wmul-1.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/wmul-1.c
index 4ef8385ef..b8fd06a56 100644
--- a/gcc-4.9/gcc/testsuite/gcc.target/i386/wmul-1.c
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/wmul-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -fno-tree-loop-vectorize" } */
/* { dg-require-effective-target ia32 } */
long long mac(const int *a, const int *b, long long sqr, long long *sum)
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/xop-pr57233.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/xop-pr57233.c
new file mode 100644
index 000000000..6129dc217
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/xop-pr57233.c
@@ -0,0 +1,16 @@
+/* PR tree-optimization/57233 */
+/* { dg-do run { target xop } } */
+/* { dg-options "-O2 -mxop" } */
+
+#include "xop-check.h"
+
+static void
+xop_test (void)
+{
+ do_main ();
+}
+
+#undef main
+#define main() do_main ()
+
+#include "../../gcc.dg/pr57233.c"