aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-11-23 09:08:47 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2016-11-23 09:08:47 +0100
commitec1c569473de7c478653b6f518d8d8bba18e3f1b (patch)
treead134efbf24d7e4a890b64a180a763b6ff99b23b /gcc
parent43fd192f76a0121197dcc3975a49b79b201f6411 (diff)
downloadgcc-ec1c569473de7c478653b6f518d8d8bba18e3f1b.zip
gcc-ec1c569473de7c478653b6f518d8d8bba18e3f1b.tar.gz
gcc-ec1c569473de7c478653b6f518d8d8bba18e3f1b.tar.bz2
re PR target/78451 (FAIL: gcc.target/i386/sse-22a.c: error: inlining failed in call to always_inline '_mm512_setzero_ps')
PR target/78451 * c-pragma.c (handle_pragma_target): Don't replace current_target_pragma, but chainon the new args to the current one. * gcc.target/i386/pr78451.c: New test. * gcc.target/i386/pr69255-1.c: Use #pragma GCC push_options and #pragma GCC pop_options around the first #pragma GCC target. * gcc.target/i386/pr69255-2.c: Likewise. * gcc.target/i386/pr69255-3.c: Likewise. From-SVN: r242740
Diffstat (limited to 'gcc')
-rw-r--r--gcc/c-family/ChangeLog6
-rw-r--r--gcc/c-family/c-pragma.c2
-rw-r--r--gcc/testsuite/ChangeLog9
-rw-r--r--gcc/testsuite/gcc.target/i386/pr69255-1.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/pr69255-2.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/pr69255-3.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/pr78451.c35
7 files changed, 63 insertions, 7 deletions
diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog
index d0d4417..3b41282 100644
--- a/gcc/c-family/ChangeLog
+++ b/gcc/c-family/ChangeLog
@@ -1,3 +1,9 @@
+2016-11-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/78451
+ * c-pragma.c (handle_pragma_target): Don't replace
+ current_target_pragma, but chainon the new args to the current one.
+
2016-11-22 Nathan Sidwell <nathan@acm.org>
* array-notation-common.c (cilkplus_extract_an_trplets): Fix
diff --git a/gcc/c-family/c-pragma.c b/gcc/c-family/c-pragma.c
index 58ef5c9..2ecacb8 100644
--- a/gcc/c-family/c-pragma.c
+++ b/gcc/c-family/c-pragma.c
@@ -893,7 +893,7 @@ handle_pragma_target(cpp_reader *ARG_UNUSED(dummy))
args = nreverse (args);
if (targetm.target_option.pragma_parse (args, NULL_TREE))
- current_target_pragma = args;
+ current_target_pragma = chainon (current_target_pragma, args);
}
}
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 8f3c782..92acce2 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,12 @@
+2016-11-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/78451
+ * gcc.target/i386/pr78451.c: New test.
+ * gcc.target/i386/pr69255-1.c: Use #pragma GCC push_options
+ and #pragma GCC pop_options around the first #pragma GCC target.
+ * gcc.target/i386/pr69255-2.c: Likewise.
+ * gcc.target/i386/pr69255-3.c: Likewise.
+
2016-11-23 Michael Collison <michael.collison@arm.com>
* testsuite/gcc.target/aarch64/and_const.c: New test to verify
diff --git a/gcc/testsuite/gcc.target/i386/pr69255-1.c b/gcc/testsuite/gcc.target/i386/pr69255-1.c
index 7a666d3..f2c1010 100644
--- a/gcc/testsuite/gcc.target/i386/pr69255-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr69255-1.c
@@ -2,7 +2,9 @@
/* { dg-do compile } */
/* { dg-options "-msse4 -mno-avx" } */
+#pragma GCC push_options
#pragma GCC target "avx512vl"
+#pragma GCC pop_options
#pragma GCC target "no-avx512vl"
__attribute__ ((__vector_size__ (32))) long long a;
__attribute__ ((__vector_size__ (16))) int b;
@@ -13,5 +15,5 @@ foo (const long long *p)
a = __builtin_ia32_gather3siv4di (a, p, b, 1, 1); /* { dg-error "needs isa option -m32 -mavx512vl" } */
}
-/* { dg-warning "AVX vector return without AVX enabled changes the ABI" "" { target *-*-* } 13 } */
-/* { dg-warning "AVX vector argument without AVX enabled changes the ABI" "" { target *-*-* } 13 } */
+/* { dg-warning "AVX vector return without AVX enabled changes the ABI" "" { target *-*-* } 15 } */
+/* { dg-warning "AVX vector argument without AVX enabled changes the ABI" "" { target *-*-* } 15 } */
diff --git a/gcc/testsuite/gcc.target/i386/pr69255-2.c b/gcc/testsuite/gcc.target/i386/pr69255-2.c
index 28eb57b..9ef6c2f 100644
--- a/gcc/testsuite/gcc.target/i386/pr69255-2.c
+++ b/gcc/testsuite/gcc.target/i386/pr69255-2.c
@@ -2,7 +2,9 @@
/* { dg-do compile } */
/* { dg-options "-msse4 -mno-avx" } */
+#pragma GCC push_options
#pragma GCC target "avx512vl"
+#pragma GCC pop_options
#pragma GCC target ""
__attribute__ ((__vector_size__ (32))) long long a;
__attribute__ ((__vector_size__ (16))) int b;
@@ -13,5 +15,5 @@ foo (const long long *p)
__builtin_ia32_gather3siv4di (a, p, b, 1, 1); /* { dg-error "needs isa option -m32 -mavx512vl" } */
}
-/* { dg-warning "AVX vector return without AVX enabled changes the ABI" "" { target *-*-* } 13 } */
-/* { dg-warning "AVX vector argument without AVX enabled changes the ABI" "" { target *-*-* } 13 } */
+/* { dg-warning "AVX vector return without AVX enabled changes the ABI" "" { target *-*-* } 15 } */
+/* { dg-warning "AVX vector argument without AVX enabled changes the ABI" "" { target *-*-* } 15 } */
diff --git a/gcc/testsuite/gcc.target/i386/pr69255-3.c b/gcc/testsuite/gcc.target/i386/pr69255-3.c
index 41fb4a2..713725d 100644
--- a/gcc/testsuite/gcc.target/i386/pr69255-3.c
+++ b/gcc/testsuite/gcc.target/i386/pr69255-3.c
@@ -2,7 +2,9 @@
/* { dg-do compile } */
/* { dg-options "-msse4 -mno-avx" } */
+#pragma GCC push_options
#pragma GCC target "avx512vl"
+#pragma GCC pop_options
#pragma GCC target ""
__attribute__ ((__vector_size__ (32))) long long a;
__attribute__ ((__vector_size__ (16))) int b;
@@ -13,5 +15,5 @@ foo (const long long *p, __attribute__ ((__vector_size__ (32))) long long *q)
*q = __builtin_ia32_gather3siv4di (a, p, b, 1, 1); /* { dg-error "needs isa option -m32 -mavx512vl" } */
}
-/* { dg-warning "AVX vector return without AVX enabled changes the ABI" "" { target *-*-* } 13 } */
-/* { dg-warning "AVX vector argument without AVX enabled changes the ABI" "" { target *-*-* } 13 } */
+/* { dg-warning "AVX vector return without AVX enabled changes the ABI" "" { target *-*-* } 15 } */
+/* { dg-warning "AVX vector argument without AVX enabled changes the ABI" "" { target *-*-* } 15 } */
diff --git a/gcc/testsuite/gcc.target/i386/pr78451.c b/gcc/testsuite/gcc.target/i386/pr78451.c
new file mode 100644
index 0000000..8bf60a4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr78451.c
@@ -0,0 +1,35 @@
+/* PR target/78451 */
+/* { dg-options "-O2 -mno-avx512f" } */
+
+#pragma GCC push_options
+#pragma GCC target ("avx512bw")
+
+static inline int __attribute__ ((__always_inline__))
+bar (void)
+{
+ return 0;
+}
+
+#pragma GCC push_options
+#pragma GCC target ("avx512vl")
+
+int
+foo (void)
+{
+ return bar ();
+}
+
+#pragma GCC pop_options
+#pragma GCC pop_options
+
+#pragma GCC push_options
+#pragma GCC target ("avx512vl")
+#pragma GCC target ("avx512bw")
+
+int
+baz (void)
+{
+ return bar ();
+}
+
+#pragma GCC pop_options