[PATCH] Fix ICE in vcond expansion with -mavx512f -mno-avx512bw (PR target/69820)
Jakub Jelinek
jakub@redhat.com
Mon Feb 15 21:00:00 GMT 2016
Hi!
We ICE on the following testcase, because vcondv32hiv32hi pattern
really needs avx512bw, but it is enabled for avx512f.
As VI_512 iterator is only used in vcond* patterns which need the
avx512bw ISA for the V64QI and V32HI modes, I've changed that iterator.
Or do you prefer to keep that iterator as is (so it will be unused)
and another one with these conditions? If yes, how should it be called.
Bootstrapped/regtested on x86_64-linux and i686-linux.
2016-02-15 Jakub Jelinek <jakub@redhat.com>
PR target/69820
* config/i386/sse.md (VI_512): Only include V64QImode and V32HImode
if TARGET_AVX512BW.
* gcc.target/i386/pr69820.c: New test.
--- gcc/config/i386/sse.md.jj 2016-02-03 23:36:39.000000000 +0100
+++ gcc/config/i386/sse.md 2016-02-15 17:07:40.694352994 +0100
@@ -522,7 +522,10 @@ (define_mode_iterator VI_128 [V16QI V8HI
(define_mode_iterator VI_256 [V32QI V16HI V8SI V4DI])
;; All 512bit vector integer modes
-(define_mode_iterator VI_512 [V64QI V32HI V16SI V8DI])
+(define_mode_iterator VI_512
+ [(V64QI "TARGET_AVX512BW")
+ (V32HI "TARGET_AVX512BW")
+ V16SI V8DI])
;; Various 128bit vector integer mode combinations
(define_mode_iterator VI12_128 [V16QI V8HI])
--- gcc/testsuite/gcc.target/i386/pr69820.c.jj 2016-02-15 17:13:57.397220839 +0100
+++ gcc/testsuite/gcc.target/i386/pr69820.c 2016-02-15 17:13:28.000000000 +0100
@@ -0,0 +1,14 @@
+/* PR target/69820 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -mavx512f -mno-avx512bw" } */
+
+int a[100], b[100];
+short c[100];
+
+void
+foo ()
+{
+ int i;
+ for (i = 0; i < 100; ++i)
+ b[i] = a[i] * (_Bool) c[i];
+}
Jakub
More information about the Gcc-patches
mailing list