[Bug tree-optimization/88464] AVX-512 vectorization of masked scatter failing with "not suitable for scatter store"

ubizjak at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Dec 19 08:53:00 GMT 2018


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88464

--- Comment #21 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Jakub Jelinek from comment #20)
> (In reply to Uroš Bizjak from comment #19)
> > FYI, there are quite some sequences like:
> > 
> >         kmovw   %k1, %r11d
> >         testb   %r11b, %r11b
> >         jne     .L63
> > 
> > (e.g. when compiling avx512f-pr88464-1.c).
> > 
> > Perhaps ktest insn can be utilized here?
> 
> It can if -mavx512dq, because we need ktestb rather than ktestw.  Or we
> could do kandw first, but that would be longer (movl $255, %r11d; kmovw
> $r11d, %k2; kandw %k1, %k2; ktestw %k2, %k2).  Have you tried with
> -mavx512dq?  I haven't added it to dg-options of the tests, because I wanted
> to test the behavior without it too and duplicating all the tests also for
> -mavx512dq would be too much.

Indeed, -mavx512dq produces expected ktestb. Sorry for the false alarm.


More information about the Gcc-bugs mailing list