public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/96344] New: [11 regerssion] gnat.dg/opt86a.adb fails starting with r11-
@ 2020-07-27 17:47 seurer at gcc dot gnu.org
  2020-07-27 17:48 ` [Bug ada/96344] " seurer at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: seurer at gcc dot gnu.org @ 2020-07-27 17:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 96344
           Summary: [11 regerssion] gnat.dg/opt86a.adb fails starting with
                    r11-
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: seurer at gcc dot gnu.org
  Target Milestone: ---

g:b3d77404c060c0d65d8d4c97254995737d0fc032, r11-1675

Executing on host: /home/seurer/gcc/git/build/gcc-ada/gcc/gnatmake
--GCC=/home/seurer/gcc/git/build/gcc-ada/gcc/xgcc
--GNATBIND=/home/seurer/gcc/git/build/gcc-ada/gcc/gnatbind
--GNATLINK=/home/seurer/gcc/git/build/gcc-ada/gcc/gnatlink -cargs
-B/home/seurer/gcc/git/build/gcc-ada/gcc -largs
--GCC=/home/seurer/gcc/git/build/gcc-ada/gcc/xgcc\
-B/home/seurer/gcc/git/build/gcc-ada/gcc\  -margs
--RTS=/home/seurer/gcc/git/build/gcc-ada/powerpc64le-unknown-linux-gnu/./libada
-q -f /home/seurer/gcc/git/gcc-ada/gcc/testsuite/gnat.dg/opt86a.adb  
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fdiagnostics-color=never  -fdiagnostics-urls=never  -O2 -fdump-tree-optimized
-c -u -S -o opt86a.s    (timeout = 300)
spawn -ignore SIGHUP /home/seurer/gcc/git/build/gcc-ada/gcc/gnatmake
--GCC=/home/seurer/gcc/git/build/gcc-ada/gcc/xgcc
--GNATBIND=/home/seurer/gcc/git/build/gcc-ada/gcc/gnatbind
--GNATLINK=/home/seurer/gcc/git/build/gcc-ada/gcc/gnatlink -cargs
-B/home/seurer/gcc/git/build/gcc-ada/gcc -largs
--GCC=/home/seurer/gcc/git/build/gcc-ada/gcc/xgcc
-B/home/seurer/gcc/git/build/gcc-ada/gcc  -margs
--RTS=/home/seurer/gcc/git/build/gcc-ada/powerpc64le-unknown-linux-gnu/./libada
-q -f /home/seurer/gcc/git/gcc-ada/gcc/testsuite/gnat.dg/opt86a.adb
-fno-diagnostics-show-caret -fno-diagnostics-show-line-numbers
-fdiagnostics-color=never -fdiagnostics-urls=never -O2 -fdump-tree-optimized -c
-u -S -o opt86a.s^M
Executing on host: /home/seurer/gcc/git/build/gcc-ada/gcc/gnatclean -c -q -n
opt86a   (timeout = 300)
spawn -ignore SIGHUP /home/seurer/gcc/git/build/gcc-ada/gcc/gnatclean -c -q -n
opt86a^M
./opt86a.ali^M
./opt86a.s^M
PASS: gnat.dg/opt86a.adb (test for excess errors)
gnat.dg/opt86a.adb: pattern found 3 times
FAIL: gnat.dg/opt86a.adb scan-tree-dump-times optimized ">>" 4

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

* [Bug ada/96344] [11 regerssion] gnat.dg/opt86a.adb fails starting with r11-
  2020-07-27 17:47 [Bug ada/96344] New: [11 regerssion] gnat.dg/opt86a.adb fails starting with r11- seurer at gcc dot gnu.org
@ 2020-07-27 17:48 ` seurer at gcc dot gnu.org
  2020-07-28  6:07 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: seurer at gcc dot gnu.org @ 2020-07-27 17:48 UTC (permalink / raw)
  To: gcc-bugs

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

seurer at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
               Host|                            |powerpc64*-linux-gnu
              Build|                            |powerpc64*-linux-gnu
             Target|                            |powerpc64*-linux-gnu
                 CC|                            |ebotcazou at gcc dot gnu.org

--- Comment #1 from seurer at gcc dot gnu.org ---
Hmmm, this looks like the revision where this test case was added.

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

* [Bug ada/96344] [11 regerssion] gnat.dg/opt86a.adb fails starting with r11-
  2020-07-27 17:47 [Bug ada/96344] New: [11 regerssion] gnat.dg/opt86a.adb fails starting with r11- seurer at gcc dot gnu.org
  2020-07-27 17:48 ` [Bug ada/96344] " seurer at gcc dot gnu.org
@ 2020-07-28  6:07 ` rguenth at gcc dot gnu.org
  2020-07-31 15:53 ` [Bug ada/96344] 3rdd case of gnat.dg/opt86a.adb fails ebotcazou at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-28  6:07 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0

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

* [Bug ada/96344] 3rdd case of gnat.dg/opt86a.adb fails
  2020-07-27 17:47 [Bug ada/96344] New: [11 regerssion] gnat.dg/opt86a.adb fails starting with r11- seurer at gcc dot gnu.org
  2020-07-27 17:48 ` [Bug ada/96344] " seurer at gcc dot gnu.org
  2020-07-28  6:07 ` rguenth at gcc dot gnu.org
@ 2020-07-31 15:53 ` ebotcazou at gcc dot gnu.org
  2020-09-28 15:50 ` [Bug tree-optimization/96344] 3rdd case of gnat.dg/opt86a.adb fails because of VRP ebotcazou at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2020-07-31 15:53 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[11 regerssion]             |3rdd case of
                   |gnat.dg/opt86a.adb fails    |gnat.dg/opt86a.adb fails
                   |starting with r11-1675      |
   Target Milestone|11.0                        |---
   Last reconfirmed|                            |2020-07-31
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
           Severity|normal                      |enhancement

--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
I can reproduce: the third optimization does not work

  <bb 22> [local count: 1070914630]:
  if (_40 == 1)
    goto <bb 24>; [0.04%]
  else
    goto <bb 23>; [99.96%]

  <bb 23> [local count: 1070486265]:
  _65 = s3_41 + 252;
  _73 = _65 & 251;
  if (_73 == 0)
    goto <bb 24>; [0.04%]
  else
    goto <bb 25>; [99.96%]

  <bb 24> [local count: 1284581]:
  .gnat_rcheck_PE_Explicit_Raise ("opt86a.adb", 27);

but that's not a regression, just a missed optimization.

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

* [Bug tree-optimization/96344] 3rdd case of gnat.dg/opt86a.adb fails because of VRP
  2020-07-27 17:47 [Bug ada/96344] New: [11 regerssion] gnat.dg/opt86a.adb fails starting with r11- seurer at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-07-31 15:53 ` [Bug ada/96344] 3rdd case of gnat.dg/opt86a.adb fails ebotcazou at gcc dot gnu.org
@ 2020-09-28 15:50 ` ebotcazou at gcc dot gnu.org
  2020-12-03 22:23 ` msebor at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2020-09-28 15:50 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|3rdd case of                |3rdd case of
                   |gnat.dg/opt86a.adb fails    |gnat.dg/opt86a.adb fails
                   |                            |because of VRP
          Component|ada                         |tree-optimization

--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
The difference is that, on x86-64, the third case is preoptimized (.dse2):

  <bb 18> [local count: 1072024872]:
  system.secondary_stack.ss_release (&FRAME.22.M12b);
  _6 = s3_35 == 1;
  _7 = s3_35 == 4;
  _8 = _6 | _7;
  _57 = s3_35 == 8;
  _56 = _8 | _57;
  if (_56 != 0)
    goto <bb 19>; [0.08%]
  else
    goto <bb 20>; [99.92%]

whereas it is not on PowerPC64:

  <bb 18> [local count: 1072024872]:
  system.secondary_stack.ss_release (&FRAME.22.M12b);
  if (_31 == 1)
    goto <bb 21>; [0.04%]
  else
    goto <bb 19>; [99.96%]

  <bb 19> [local count: 1071596063]:
  if (s3_32 == 4)
    goto <bb 21>; [0.04%]
  else
    goto <bb 20>; [99.96%]

  <bb 20> [local count: 1071167425]:
  if (s3_32 == 8)
    goto <bb 21>; [0.04%]
  else
    goto <bb 22>; [99.96%]

Note the _31 in the first arm instead of s3_32: VRP1 has propagated

s3_32 = (opt86_pkg__enum) _31;

into the first arm but not the others...  So -fno-tree-vrp is a workaround.

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

* [Bug tree-optimization/96344] 3rdd case of gnat.dg/opt86a.adb fails because of VRP
  2020-07-27 17:47 [Bug ada/96344] New: [11 regerssion] gnat.dg/opt86a.adb fails starting with r11- seurer at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-09-28 15:50 ` [Bug tree-optimization/96344] 3rdd case of gnat.dg/opt86a.adb fails because of VRP ebotcazou at gcc dot gnu.org
@ 2020-12-03 22:23 ` msebor at gcc dot gnu.org
  2020-12-03 22:41 ` ebotcazou at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: msebor at gcc dot gnu.org @ 2020-12-03 22:23 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Sebor <msebor at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |msebor at gcc dot gnu.org

--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
Also seen on x86_64-linux.  I was about to open a bug with this:

A fresh build of trunk on x86_64 shows the following Ada failures:

!  FAIL: gnat.dg/opt86a.adb (1: +1)
!  FAIL: gnat.dg/opt86b.adb (1: +1)
!  FAIL: gnat.dg/opt86c.adb (1: +1)

The logs show this:

$ grep "FAIL: gnat.dg/opt86" gcc/testsuite/gnat/gnat.log
FAIL: gnat.dg/opt86a.adb scan-tree-dump-times optimized ">>" 4
FAIL: gnat.dg/opt86b.adb scan-tree-dump-not optimized "> 29"
FAIL: gnat.dg/opt86c.adb scan-tree-dump-not optimized "> 26"

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

* [Bug tree-optimization/96344] 3rdd case of gnat.dg/opt86a.adb fails because of VRP
  2020-07-27 17:47 [Bug ada/96344] New: [11 regerssion] gnat.dg/opt86a.adb fails starting with r11- seurer at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-12-03 22:23 ` msebor at gcc dot gnu.org
@ 2020-12-03 22:41 ` ebotcazou at gcc dot gnu.org
  2020-12-08  8:04 ` cvs-commit at gcc dot gnu.org
  2020-12-08  8:05 ` ebotcazou at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2020-12-03 22:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> A fresh build of trunk on x86_64 shows the following Ada failures:
> 
> !  FAIL: gnat.dg/opt86a.adb (1: +1)
> !  FAIL: gnat.dg/opt86b.adb (1: +1)
> !  FAIL: gnat.dg/opt86c.adb (1: +1)
> 
> The logs show this:
> 
> $ grep "FAIL: gnat.dg/opt86" gcc/testsuite/gnat/gnat.log
> FAIL: gnat.dg/opt86a.adb scan-tree-dump-times optimized ">>" 4
> FAIL: gnat.dg/opt86b.adb scan-tree-dump-not optimized "> 29"
> FAIL: gnat.dg/opt86c.adb scan-tree-dump-not optimized "> 26"

Introduced on 12/01, probably by:

2020-12-01  Martin Liska  <mliska@suse.cz>

        PR tree-optimization/14799
        PR ipa/88702
        * Makefile.in: Add gimple-if-to-switch.o.
        * dbgcnt.def (DEBUG_COUNTER): Add new debug counter.
        * passes.def: Include new pass_if_to_switch pass.
        * timevar.def (TV_TREE_IF_TO_SWITCH): New timevar.
        * tree-pass.h (make_pass_if_to_switch): New.
        * tree-ssa-reassoc.c (struct operand_entry): Move to the header.
        (dump_range_entry): Move to header file.
        (debug_range_entry): Likewise.
        (no_side_effect_bb): Make it global.
        * tree-switch-conversion.h (simple_cluster::simple_cluster):
        Add inline for couple of functions in order to prevent error
        about multiple defined symbols.
        * gimple-if-to-switch.cc: New file.
        * tree-ssa-reassoc.h: New file.

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

* [Bug tree-optimization/96344] 3rdd case of gnat.dg/opt86a.adb fails because of VRP
  2020-07-27 17:47 [Bug ada/96344] New: [11 regerssion] gnat.dg/opt86a.adb fails starting with r11- seurer at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2020-12-03 22:41 ` ebotcazou at gcc dot gnu.org
@ 2020-12-08  8:04 ` cvs-commit at gcc dot gnu.org
  2020-12-08  8:05 ` ebotcazou at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-08  8:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Eric Botcazou <ebotcazou@gcc.gnu.org>:

https://gcc.gnu.org/g:ffd961fc053419bc1eb37792c18ec98e7c3bc364

commit r11-5836-gffd961fc053419bc1eb37792c18ec98e7c3bc364
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Tue Dec 8 08:57:46 2020 +0100

    PR tree-optimization/96344

    The very recent addition of the if_to_switch pass has partially disabled
    the optimization added back in June to optimize_range_tests_to_bit_test,
    as witnessed by the 3 new failures in the gnat.dg testsuite.  It turns out
    that both tree-ssa-reassoc.c and tree-switch-conversion.c can turn things
    into bit tests so the optimization is added to bit_test_cluster::emit too.

    The patch also contains a secondary optimization, whereby the full bit-test
    sequence is sent to the folder before being gimplified in case there is
only
    one test, so that the optimal sequence (bt + jc on x86) can be emitted like
    with optimize_range_tests_to_bit_test.

    gcc/ChangeLog:
            PR tree-optimization/96344
            * tree-switch-conversion.c (bit_test_cluster::emit): Compute the
            range only if an entry test is necessary.  Merge the entry test in
            the bit test when possible.  Use PREC local variable consistently.
            When there is only one test, do a single gimplification at the end.

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

* [Bug tree-optimization/96344] 3rdd case of gnat.dg/opt86a.adb fails because of VRP
  2020-07-27 17:47 [Bug ada/96344] New: [11 regerssion] gnat.dg/opt86a.adb fails starting with r11- seurer at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2020-12-08  8:04 ` cvs-commit at gcc dot gnu.org
@ 2020-12-08  8:05 ` ebotcazou at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2020-12-08  8:05 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |11.0
             Status|NEW                         |RESOLVED

--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Fixed everywhere.

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

end of thread, other threads:[~2020-12-08  8:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 17:47 [Bug ada/96344] New: [11 regerssion] gnat.dg/opt86a.adb fails starting with r11- seurer at gcc dot gnu.org
2020-07-27 17:48 ` [Bug ada/96344] " seurer at gcc dot gnu.org
2020-07-28  6:07 ` rguenth at gcc dot gnu.org
2020-07-31 15:53 ` [Bug ada/96344] 3rdd case of gnat.dg/opt86a.adb fails ebotcazou at gcc dot gnu.org
2020-09-28 15:50 ` [Bug tree-optimization/96344] 3rdd case of gnat.dg/opt86a.adb fails because of VRP ebotcazou at gcc dot gnu.org
2020-12-03 22:23 ` msebor at gcc dot gnu.org
2020-12-03 22:41 ` ebotcazou at gcc dot gnu.org
2020-12-08  8:04 ` cvs-commit at gcc dot gnu.org
2020-12-08  8:05 ` ebotcazou at gcc dot gnu.org

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).