This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix tree-opt/36891 ICE with vector division and -ffast-math and LIM


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]