This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, i386] Merge SSE and AVX ptest patterns.
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Kirill Yukhin <kirill dot yukhin at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 4 Aug 2015 14:06:14 +0200
- Subject: Re: [PATCH, i386] Merge SSE and AVX ptest patterns.
- Authentication-results: sourceware.org; auth=none
- References: <20150804115838 dot GB32256 at msticlxl57 dot ims dot intel dot com>
On Tue, Aug 4, 2015 at 1:58 PM, Kirill Yukhin <kirill.yukhin@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.