This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix tree-opt/36891 ICE with vector division and -ffast-math and LIM
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "Andrew Pinski" <pinskia at gmail dot com>
- Cc: "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 29 Sep 2008 07:59:02 -0700
- Subject: Re: [PATCH] Fix tree-opt/36891 ICE with vector division and -ffast-math and LIM
- References: <de8d50360809281515w3c6f6f26n1664a134a87d5469@mail.gmail.com>
On Sun, Sep 28, 2008 at 3:15 PM, Andrew Pinski <pinskia@gmail.com> wrote:
> Hi,
> The issue here is two fold, first the vector variable was not being
> marked as a gimple register. And then we were creating a REAL_CST of
> a vector type which is invalid.
> This patch fixes the issue by marking the newly created variable as a
> gimple register and also creating a VECTOR_CST with all ones for the
> division.
> This patch does assume if the target has vector division, it also has
> vector multiplication. I don't know of a target which does not have
> that though.
>
> OK? Bootstrapped and tested on i386-darwin with no regressions (Darwin
> has SSE2 turned on by default).
The testcase doesn't work on Linux/ia32 since SSE2 is off by default:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37675
> Thanks,
> Andrew Pinski
>
> ChangeLog:
> * tree-ssa-loop-im.c (rewrite_reciprocal): Set DECL_GIMPLE_REG_P on
> the newly created variable.
> Create a VECTOR_CST of all 1s for vector types.
>
> testsuite/ChangeLog:
> * gcc.dg/torture/pr36891.c: New testcase.
>
--
H.J.