aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@gcc.gnu.org>2016-09-06 22:30:57 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2016-09-06 22:30:57 +0200
commit8eb9e049afc30be66324513ac21f10fb4859b6a0 (patch)
tree65b1771914e80194aaa58ebfe35c44211d77d955 /gcc
parenta42e7952b0af76c0c16d341d25eaad7f044b5dc4 (diff)
downloadgcc-8eb9e049afc30be66324513ac21f10fb4859b6a0.zip
gcc-8eb9e049afc30be66324513ac21f10fb4859b6a0.tar.gz
gcc-8eb9e049afc30be66324513ac21f10fb4859b6a0.tar.bz2
re PR target/69255 (ICE on x86_64-linux-gnu in "emit_move_insn")
PR target/69255 * config/i386/i386.c (ix86_expand_builtin): For builtin with unsupported or unknown ISA, use expand_call. * gcc.target/i386/pr69255-1.c: New test. * gcc.target/i386/pr69255-2.c: New test. * gcc.target/i386/pr69255-3.c: New test. From-SVN: r240014
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/i386/i386.c2
-rw-r--r--gcc/testsuite/ChangeLog9
-rw-r--r--gcc/testsuite/gcc.target/i386/pr69255-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pr69255-2.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pr69255-3.c17
6 files changed, 66 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e23891e..7fb0212 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2016-09-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/69255
+ * config/i386/i386.c (ix86_expand_builtin): For builtin with
+ unsupported or unknown ISA, use expand_call.
+
2016-09-06 Martin Liska <mliska@suse.cz>
PR gcov-profile/77378
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index dc92f9b..0160829 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -36107,7 +36107,7 @@ ix86_expand_builtin (tree exp, rtx target, rtx subtarget,
error ("%qE needs isa option %s", fndecl, opts);
free (opts);
}
- return const0_rtx;
+ return expand_call (exp, target, ignore);
}
switch (fcode)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 4e24658..6077420 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,4 +1,11 @@
-2016-09-06 Martin Sebor <msebor@redhat.com>
+2016-09-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/69255
+ * gcc.target/i386/pr69255-1.c: New test.
+ * gcc.target/i386/pr69255-2.c: New test.
+ * gcc.target/i386/pr69255-3.c: New test.
+
+2016-09-06 Martin Sebor <msebor@redhat.com>
PR c/77336
* gcc.dg/format/miss-7.c: New test.
diff --git a/gcc/testsuite/gcc.target/i386/pr69255-1.c b/gcc/testsuite/gcc.target/i386/pr69255-1.c
new file mode 100644
index 0000000..7a666d3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr69255-1.c
@@ -0,0 +1,17 @@
+/* PR target/69255 */
+/* { dg-do compile } */
+/* { dg-options "-msse4 -mno-avx" } */
+
+#pragma GCC target "avx512vl"
+#pragma GCC target "no-avx512vl"
+__attribute__ ((__vector_size__ (32))) long long a;
+__attribute__ ((__vector_size__ (16))) int b;
+
+void
+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 } */
diff --git a/gcc/testsuite/gcc.target/i386/pr69255-2.c b/gcc/testsuite/gcc.target/i386/pr69255-2.c
new file mode 100644
index 0000000..28eb57b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr69255-2.c
@@ -0,0 +1,17 @@
+/* PR target/69255 */
+/* { dg-do compile } */
+/* { dg-options "-msse4 -mno-avx" } */
+
+#pragma GCC target "avx512vl"
+#pragma GCC target ""
+__attribute__ ((__vector_size__ (32))) long long a;
+__attribute__ ((__vector_size__ (16))) int b;
+
+void
+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 } */
diff --git a/gcc/testsuite/gcc.target/i386/pr69255-3.c b/gcc/testsuite/gcc.target/i386/pr69255-3.c
new file mode 100644
index 0000000..41fb4a2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr69255-3.c
@@ -0,0 +1,17 @@
+/* PR target/69255 */
+/* { dg-do compile } */
+/* { dg-options "-msse4 -mno-avx" } */
+
+#pragma GCC target "avx512vl"
+#pragma GCC target ""
+__attribute__ ((__vector_size__ (32))) long long a;
+__attribute__ ((__vector_size__ (16))) int b;
+
+void
+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 } */