public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/68130] New: [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin14 after r228971
@ 2015-10-28 11:23 dominiq at lps dot ens.fr
  2015-10-28 11:24 ` [Bug tree-optimization/68130] " dominiq at lps dot ens.fr
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-28 11:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68130

            Bug ID: 68130
           Summary: [6 Regression] gfortran.dg/ieee/ieee_2.f90 is
                    miscomputed with '-Os -m32' on x86_64-apple-darwin14
                    after r228971
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dominiq at lps dot ens.fr
                CC: fxcoudert at gcc dot gnu.org,
                    howarth.at.gcc.testresults at gmail dot com,
                    iains at gcc dot gnu.org, rguenth at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-apple-darwin14
            Target: x86_64-apple-darwin14
             Build: x86_64-apple-darwin14

The test gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on
x86_64-apple-darwin14 after r228971.

Note that the test fails before that revision when compiled with other
optimizations and with/without -m32.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug tree-optimization/68130] [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin14 after r228971
  2015-10-28 11:23 [Bug tree-optimization/68130] New: [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin14 after r228971 dominiq at lps dot ens.fr
@ 2015-10-28 11:24 ` dominiq at lps dot ens.fr
  2015-10-28 11:52 ` dominiq at lps dot ens.fr
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-28 11:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68130

--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Created attachment 36602
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36602&action=edit
Reduced test

I have tried to reduce the test further, but when I comment a line the test
succeeds.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug tree-optimization/68130] [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin14 after r228971
  2015-10-28 11:23 [Bug tree-optimization/68130] New: [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin14 after r228971 dominiq at lps dot ens.fr
  2015-10-28 11:24 ` [Bug tree-optimization/68130] " dominiq at lps dot ens.fr
@ 2015-10-28 11:52 ` dominiq at lps dot ens.fr
  2015-10-28 13:18 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-28 11:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68130

--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Created attachment 36604
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36604&action=edit
bzipped tar file

> Did you specifically narrow the issue down to r228971?  

Yes.

> If so can you please attach dumps produced by -fdump-tree-fre-details
> -fdump-tree-pre-details for that revision and the revision before?

The attached file is the bzipped tar file of a directory containing the
requested files for r228970 and r228971.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug tree-optimization/68130] [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin14 after r228971
  2015-10-28 11:23 [Bug tree-optimization/68130] New: [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin14 after r228971 dominiq at lps dot ens.fr
  2015-10-28 11:24 ` [Bug tree-optimization/68130] " dominiq at lps dot ens.fr
  2015-10-28 11:52 ` dominiq at lps dot ens.fr
@ 2015-10-28 13:18 ` rguenth at gcc dot gnu.org
  2015-10-28 13:27 ` dominiq at lps dot ens.fr
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-10-28 13:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68130

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ok. The FRE2 difference is interesting but ok.  We CSE

  _7 = __builtin_signbit (1.2999999523162841796875e+0);
  if (_7 != 0)
    goto <bb 4>;
  else
    goto <bb 3>;

  <bb 3>:

  <bb 4>:
  # iftmp.9_8 = PHI <-1.0e+0(2), 1.0e+0(3)>

...
  <bb 14>:
  if (_7 != 0)
    goto <bb 16>;
  else
    goto <bb 15>;

  <bb 15>:

  <bb 16>:
  # iftmp.13_15 = PHI <-1.0e+0(14), 1.0e+0(15)>
  _16 = __builtin_copysignf (-1.2999999523162841796875e+0, iftmp.13_15);

to use iftmp.9_8 in the last copysignf statement, removing the PHI node
preceeding it as well as the redundant test of _7 != 0.  We do this for
five cases.

The PRE dump difference is pretty unreadable already.  So I wonder if
the issue reproduces with -fno-tree-pre added.  If not I wonder
if it reproduces with -fdisable-tree-fre2 or at least -fno-tree-tail-merge.

AFAIK x86_64-darwin uses SSE math even with -m32, correct?  On x86_64-linux
I can't fully get rid of the use of the FP stack (library calls).


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug tree-optimization/68130] [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin14 after r228971
  2015-10-28 11:23 [Bug tree-optimization/68130] New: [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin14 after r228971 dominiq at lps dot ens.fr
                   ` (2 preceding siblings ...)
  2015-10-28 13:18 ` rguenth at gcc dot gnu.org
@ 2015-10-28 13:27 ` dominiq at lps dot ens.fr
  2015-10-28 13:36 ` rguenther at suse dot de
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-28 13:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68130

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-10-28
     Ever confirmed|0                           |1

--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> The PRE dump difference is pretty unreadable already.  So I wonder if
> the issue reproduces with -fno-tree-pre added.  If not I wonder
> if it reproduces with -fdisable-tree-fre2 or at least -fno-tree-tail-merge.

The test succeeds with '-fno-tree-pre -fdisable-tree-fre2':

[Book15] f90/bug% /opt/gcc/gcc6p-228971/bin/gfortran ieee_2_red_2.f90 -Os -m32
-fno-tree-pre -fdisable-tree-fre2
f951: note: disable pass tree-fre2 for functions in the range of [0,
4294967295]
[Book15] f90/bug% a.out
[Book15] f90/bug%

but fails with the other options above.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug tree-optimization/68130] [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin14 after r228971
  2015-10-28 11:23 [Bug tree-optimization/68130] New: [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin14 after r228971 dominiq at lps dot ens.fr
                   ` (3 preceding siblings ...)
  2015-10-28 13:27 ` dominiq at lps dot ens.fr
@ 2015-10-28 13:36 ` rguenther at suse dot de
  2015-10-28 13:53 ` dominiq at lps dot ens.fr
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenther at suse dot de @ 2015-10-28 13:36 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68130

--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> ---
On Wed, 28 Oct 2015, dominiq at lps dot ens.fr wrote:

> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68130
> 
> Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>              Status|UNCONFIRMED                 |NEW
>    Last reconfirmed|                            |2015-10-28
>      Ever confirmed|0                           |1
> 
> --- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
> > The PRE dump difference is pretty unreadable already.  So I wonder if
> > the issue reproduces with -fno-tree-pre added.  If not I wonder
> > if it reproduces with -fdisable-tree-fre2 or at least -fno-tree-tail-merge.
> 
> The test succeeds with '-fno-tree-pre -fdisable-tree-fre2':
> 
> [Book15] f90/bug% /opt/gcc/gcc6p-228971/bin/gfortran ieee_2_red_2.f90 -Os -m32
> -fno-tree-pre -fdisable-tree-fre2
> f951: note: disable pass tree-fre2 for functions in the range of [0,
> 4294967295]
> [Book15] f90/bug% a.out
> [Book15] f90/bug%
> 
> but fails with the other options above.

Just double-checking - the test fails with -Os -m32 -fno-tree-pre.  Then
the FRE2 transform I cited triggers the issue.  Can you attach
-fdump-rtl-expand-details dumps with that options for both revs?


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug tree-optimization/68130] [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin14 after r228971
  2015-10-28 11:23 [Bug tree-optimization/68130] New: [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin14 after r228971 dominiq at lps dot ens.fr
                   ` (4 preceding siblings ...)
  2015-10-28 13:36 ` rguenther at suse dot de
@ 2015-10-28 13:53 ` dominiq at lps dot ens.fr
  2015-10-28 13:54 ` dominiq at lps dot ens.fr
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-28 13:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68130

--- Comment #7 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Created attachment 36606
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36606&action=edit
Dump file with  -Os -m32 -fno-tree-pre -fdump-rtl-expand-details and r228970

> Just double-checking - the test fails with -Os -m32 -fno-tree-pre.  Then
> the FRE2 transform I cited triggers the issue.  Can you attach
> -fdump-rtl-expand-details dumps with that options for both revs?

Dump file for r228970.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug tree-optimization/68130] [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin14 after r228971
  2015-10-28 11:23 [Bug tree-optimization/68130] New: [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin14 after r228971 dominiq at lps dot ens.fr
                   ` (5 preceding siblings ...)
  2015-10-28 13:53 ` dominiq at lps dot ens.fr
@ 2015-10-28 13:54 ` dominiq at lps dot ens.fr
  2015-10-28 17:01 ` dominiq at lps dot ens.fr
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-28 13:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68130

--- Comment #8 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Created attachment 36607
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36607&action=edit
Dump file with -Os -m32 -fno-tree-pre -fdump-rtl-expand-details and r228971


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug tree-optimization/68130] [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin14 after r228971
  2015-10-28 11:23 [Bug tree-optimization/68130] New: [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin14 after r228971 dominiq at lps dot ens.fr
                   ` (6 preceding siblings ...)
  2015-10-28 13:54 ` dominiq at lps dot ens.fr
@ 2015-10-28 17:01 ` dominiq at lps dot ens.fr
  2015-10-28 17:45 ` [Bug tree-optimization/68130] [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin1* " dominiq at lps dot ens.fr
  2015-10-29 23:07 ` dominiq at lps dot ens.fr
  9 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-28 17:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68130

--- Comment #9 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
This PR seems fixed/papered over by the patch at
https://gcc.gnu.org/ml/fortran/2015-10/msg00163.html.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug tree-optimization/68130] [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin1* after r228971
  2015-10-28 11:23 [Bug tree-optimization/68130] New: [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin14 after r228971 dominiq at lps dot ens.fr
                   ` (7 preceding siblings ...)
  2015-10-28 17:01 ` dominiq at lps dot ens.fr
@ 2015-10-28 17:45 ` dominiq at lps dot ens.fr
  2015-10-29 23:07 ` dominiq at lps dot ens.fr
  9 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-28 17:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68130

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|x86_64-apple-darwin14       |x86_64-apple-darwin1*
               Host|x86_64-apple-darwin14       |x86_64-apple-darwin1*
            Summary|[6 Regression]              |[6 Regression]
                   |gfortran.dg/ieee/ieee_2.f90 |gfortran.dg/ieee/ieee_2.f90
                   |is miscomputed with '-Os    |is miscomputed with '-Os
                   |-m32' on                    |-m32' on
                   |x86_64-apple-darwin14 after |x86_64-apple-darwin1* after
                   |r228971                     |r228971
              Build|x86_64-apple-darwin14       |x86_64-apple-darwin1*

--- Comment #10 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Fails also on x86_64-apple-darwin10 and a clean tree at r229482.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug tree-optimization/68130] [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin1* after r228971
  2015-10-28 11:23 [Bug tree-optimization/68130] New: [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin14 after r228971 dominiq at lps dot ens.fr
                   ` (8 preceding siblings ...)
  2015-10-28 17:45 ` [Bug tree-optimization/68130] [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin1* " dominiq at lps dot ens.fr
@ 2015-10-29 23:07 ` dominiq at lps dot ens.fr
  9 siblings, 0 replies; 11+ messages in thread
From: dominiq at lps dot ens.fr @ 2015-10-29 23:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68130

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #11 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
Fixed by revision r229515. Thanks for the quick fix.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-10-29 23:07 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-28 11:23 [Bug tree-optimization/68130] New: [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin14 after r228971 dominiq at lps dot ens.fr
2015-10-28 11:24 ` [Bug tree-optimization/68130] " dominiq at lps dot ens.fr
2015-10-28 11:52 ` dominiq at lps dot ens.fr
2015-10-28 13:18 ` rguenth at gcc dot gnu.org
2015-10-28 13:27 ` dominiq at lps dot ens.fr
2015-10-28 13:36 ` rguenther at suse dot de
2015-10-28 13:53 ` dominiq at lps dot ens.fr
2015-10-28 13:54 ` dominiq at lps dot ens.fr
2015-10-28 17:01 ` dominiq at lps dot ens.fr
2015-10-28 17:45 ` [Bug tree-optimization/68130] [6 Regression] gfortran.dg/ieee/ieee_2.f90 is miscomputed with '-Os -m32' on x86_64-apple-darwin1* " dominiq at lps dot ens.fr
2015-10-29 23:07 ` dominiq at lps dot ens.fr

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).