This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Ensure vcond* expansion doesn't fail on x86 (PR target/50310)
- From: Uros Bizjak <ubizjak at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 7 Sep 2011 21:54:03 +0200
- Subject: Re: [PATCH] Ensure vcond* expansion doesn't fail on x86 (PR target/50310)
- References: <20110907181732.GN2687@tyan-ft48-01.lab.bos.redhat.com>
On Wed, Sep 7, 2011 at 8:17 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> The attached testcase ICEs, because the vectorizer assumes that if vcond*
> is available, it supports all comparisons, not just a subset of them.
> With -mavx vcmpd etc. already support all the needed comparisons (and
> several more - we wouldn't even need to swap the arguments), for SSE
> the only missing ones (LTGT and UNEQ) can be handled as ORDERED & NE
> resp. UNORDERED | EQ.
>
> Bootstrapped/regtested on x86_64-linux and i686-linux (on non-AVX host),
> plus regtested on x86_64-linux on AVX box. ?Ok for trunk and 4.6?
>
> 2011-09-07 ?Jakub Jelinek ?<jakub@redhat.com>
>
> ? ? ? ?PR target/50310
> ? ? ? ?* config/i386/i386.c (ix86_prepare_sse_fp_compare_args): For
> ? ? ? ?TARGET_AVX return code for LTGT and UNEQ.
> ? ? ? ?(ix86_expand_fp_vcond): Handle LTGT and UNEQ.
>
> ? ? ? ?* gcc.c-torture/execute/ieee/pr50310.c: New test.
> ? ? ? ?* gcc.dg/pr50310-2.c: New test.
Please put early exit for TARGET_SSE at the beginning of
ix86_prepare_sse_fp_compare_args function. There is really no need to
swap operands - and to help reload, since AVX instructions are
three-operand instructions.
OK for mainline with this change.
Thanks,
Uros.