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
H.J. Lu wrote:
> 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:
Committed this:
2008-09-30 Paolo Bonzini <bonzini@gnu.org>
PR testsuite/37675
* gcc.dg/torture/pr36891.c: Add -msse on 32-bit i386.
Index: testsuite/gcc.dg/torture/pr36891.c
===================================================================
--- testsuite/gcc.dg/torture/pr36891.c (revision 140778)
+++ testsuite/gcc.dg/torture/pr36891.c (working copy)
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-ffast-math" } */
+/* { dg-options "-ffast-math -msse" { target { { i?86-*-* x86_64-*-* }
&& ilp32 } } } */
#define __vector __attribute__((vector_size(16) ))
__vector float f(void);
Paolo