On Tue, Aug 4, 2015 at 1:58 PM, Kirill Yukhin <kirill.yuk...@gmail.com> wrote: > Hello, > I've merged ptest insn patterns from AVX and SSE. > I've also extended mode iterator to allow any 128/256 bit mode > for the insn as it register-wide, which may help implementing > https://gcc.gnu.org/ml/gcc-patches/2015-05/msg02788.html > > > Bootstrapped and regtested. > > If no objections, I'll commit it into main trunk tomorrow morning (Moscow > time). > > gcc/ > * config/i386/i386.c (bdesc_args): Rename CODE_FOR_sse4_1_ptest into > CODE_FOR_sse4_1_ptestv2di and CODE_FOR_avx_vtestps256 into > CODE_FOR_avx_ptestv4di. > * config/i386/sse.md (define_mode_iterator V_AVX): New. > (define_mode_attr sse4_1): Extend to other 128/256-bit modes. > (define_insn "avx_ptest256"): Merge this ... > (define_insn "sse4_1_ptest"): And this ... > (define_insn "<sse4_1>_ptest<mode>"): Into this. Use V_AVX iterator. > > + (set (attr "btver2_decode") > + (if_then_else > + (and (eq_attr "alternative" "2") > + (match_test "<sseinsnmode>mode==OImode")) > + (const_string "vector") > + (const_string "*")))
"vector" does not depend on alternative, but only on <sseinsnsmode>mode. So the and above should be removed. Uros.