diff mbox

[ciklplus] : Use -ffloat-store for 32bit x86 in cilk-plus/AN/builtin_fn_{custom,mutating}.c

Message ID CAFULd4am0XoiRmDT6PzhMZGj9B9ve-zh75pyZsrz_nj4hzTrsw@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak Nov. 22, 2014, 6:50 p.m. UTC
Hello!

These two tests fix PR target/63847 [1], where x87 excess precision
causes testcase to fail. The problem was triggered by -fpic, please
see the PR for analysis.

The patch adds -ffloat-store for 32bit x86 target, a standard and well
tested solution for this problem.

2014-11-22  Uros Bizjak  <ubizjak@gmail.com>

    PR target/63847
    * c-c++-common/cilk-plus/AN/builtin_fn_custom.c: Add -ffloat-store
    for 32bit x86 targets.
    * c-c++-common/cilk-plus/AN/builtin_fn_mutating.c: Ditto.

The patch was tested on x86_64-linux-gnu/-m32 {,-fpic}.

OK for mainline?

[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63847

Uros.

Comments

Jeff Law Nov. 24, 2014, 9:33 p.m. UTC | #1
On 11/22/14 11:50, Uros Bizjak wrote:
> Hello!
>
> These two tests fix PR target/63847 [1], where x87 excess precision
> causes testcase to fail. The problem was triggered by -fpic, please
> see the PR for analysis.
>
> The patch adds -ffloat-store for 32bit x86 target, a standard and well
> tested solution for this problem.
>
> 2014-11-22  Uros Bizjak  <ubizjak@gmail.com>
>
>      PR target/63847
>      * c-c++-common/cilk-plus/AN/builtin_fn_custom.c: Add -ffloat-store
>      for 32bit x86 targets.
>      * c-c++-common/cilk-plus/AN/builtin_fn_mutating.c: Ditto.
OK.
Jeff
Richard Biener Nov. 25, 2014, 9:23 a.m. UTC | #2
On Mon, Nov 24, 2014 at 10:33 PM, Jeff Law <law@redhat.com> wrote:
> On 11/22/14 11:50, Uros Bizjak wrote:
>>
>> Hello!
>>
>> These two tests fix PR target/63847 [1], where x87 excess precision
>> causes testcase to fail. The problem was triggered by -fpic, please
>> see the PR for analysis.
>>
>> The patch adds -ffloat-store for 32bit x86 target, a standard and well
>> tested solution for this problem.
>>
>> 2014-11-22  Uros Bizjak  <ubizjak@gmail.com>
>>
>>      PR target/63847
>>      * c-c++-common/cilk-plus/AN/builtin_fn_custom.c: Add -ffloat-store
>>      for 32bit x86 targets.
>>      * c-c++-common/cilk-plus/AN/builtin_fn_mutating.c: Ditto.
>
> OK.

Don't we have -fexcess-precision=standard for this now?

Richard.

> Jeff
>
Uros Bizjak Nov. 25, 2014, 9:38 a.m. UTC | #3
On Tue, Nov 25, 2014 at 10:23 AM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On Mon, Nov 24, 2014 at 10:33 PM, Jeff Law <law@redhat.com> wrote:
>> On 11/22/14 11:50, Uros Bizjak wrote:
>>>
>>> Hello!
>>>
>>> These two tests fix PR target/63847 [1], where x87 excess precision
>>> causes testcase to fail. The problem was triggered by -fpic, please
>>> see the PR for analysis.
>>>
>>> The patch adds -ffloat-store for 32bit x86 target, a standard and well
>>> tested solution for this problem.
>>>
>>> 2014-11-22  Uros Bizjak  <ubizjak@gmail.com>
>>>
>>>      PR target/63847
>>>      * c-c++-common/cilk-plus/AN/builtin_fn_custom.c: Add -ffloat-store
>>>      for 32bit x86 targets.
>>>      * c-c++-common/cilk-plus/AN/builtin_fn_mutating.c: Ditto.
>>
>> OK.
>
> Don't we have -fexcess-precision=standard for this now?

Oh ... indeed. I will update the patch to enable it for all x86 targets.

Thanks,
Uros.
Uros Bizjak Nov. 25, 2014, 10:47 a.m. UTC | #4
On Tue, Nov 25, 2014 at 10:38 AM, Uros Bizjak <ubizjak@gmail.com> wrote:

>>>> These two tests fix PR target/63847 [1], where x87 excess precision
>>>> causes testcase to fail. The problem was triggered by -fpic, please
>>>> see the PR for analysis.
>>>>
>>>> The patch adds -ffloat-store for 32bit x86 target, a standard and well
>>>> tested solution for this problem.
>>>>
>>>> 2014-11-22  Uros Bizjak  <ubizjak@gmail.com>
>>>>
>>>>      PR target/63847
>>>>      * c-c++-common/cilk-plus/AN/builtin_fn_custom.c: Add -ffloat-store
>>>>      for 32bit x86 targets.
>>>>      * c-c++-common/cilk-plus/AN/builtin_fn_mutating.c: Ditto.
>>>
>>> OK.
>>
>> Don't we have -fexcess-precision=standard for this now?
>
> Oh ... indeed. I will update the patch to enable it for all x86 targets.

cc1plus: sorry, unimplemented: -fexcess-precision=standard for C++

Uros.
diff mbox

Patch

Index: c-c++-common/cilk-plus/AN/builtin_fn_custom.c
===================================================================
--- c-c++-common/cilk-plus/AN/builtin_fn_custom.c	(revision 217961)
+++ c-c++-common/cilk-plus/AN/builtin_fn_custom.c	(working copy)
@@ -1,5 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-fcilkplus" } */
+/* { dg-additional-options "-ffloat-store" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
 
 #define NUMBER 100
 #if HAVE_IO
Index: c-c++-common/cilk-plus/AN/builtin_fn_mutating.c
===================================================================
--- c-c++-common/cilk-plus/AN/builtin_fn_mutating.c	(revision 217961)
+++ c-c++-common/cilk-plus/AN/builtin_fn_mutating.c	(working copy)
@@ -1,5 +1,6 @@ 
 /* { dg-do run } */
 /* { dg-options "-fcilkplus" } */
+/* { dg-additional-options "-ffloat-store" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
 
 #define NUMBER 100
 #if HAVE_IO