[Bug tree-optimization/91790] New: ICE: Segmentation fault (in vr_values::vrp_visit_assignment_or_call), or ICE: verify_ssa failed (error: definition in block 2 follows the use)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug tree-optimization/91790] New: ICE: Segmentation fault (in vr_values::vrp_visit_assignment_or_call), or ICE: verify_ssa failed (error: definition in block 2 follows the use)

rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91790

            Bug ID: 91790
           Summary: ICE: Segmentation fault (in
                    vr_values::vrp_visit_assignment_or_call), or ICE:
                    verify_ssa failed (error: definition in block 2
                    follows the use)
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: ice-checking, ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: powerpc-*-linux-gnu

Created attachment 46888
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46888&action=edit
Testcase

g++-10.0.0-alpha20190915 snapshot (r275736) ICEs when compiling the attached
testcase, partially reduced from
libstdc++-v3/testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc, w/
-mvsx -O3 for 32-bit BE powerpc:

w/ -fchecking:

% powerpc-e300c3-linux-gnu-g++-10.0.0-alpha20190915 -mvsx -O3 -fchecking -c
tp2khayx.cc
tp2khayx.cc: In function 'void bg()':
tp2khayx.cc:75:6: error: definition in block 2 follows the use
   75 | void bg() {
      |      ^~
for SSA_NAME: _30 in statement:
vectp.75_391 = _30;
during GIMPLE pass: slp
tp2khayx.cc:75:6: internal compiler error: verify_ssa failed
0x123fdef verify_ssa(bool, bool)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-10.0.0_alpha20190915/work/gcc-10-20190915/gcc/tree-ssa.c:1208
0xf2ed08 execute_function_todo
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-10.0.0_alpha20190915/work/gcc-10-20190915/gcc/passes.c:1990
0xf2f41a execute_todo
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-10.0.0_alpha20190915/work/gcc-10-20190915/gcc/passes.c:2037

w/ -fno-checking:

% powerpc-e300c3-linux-gnu-g++-10.0.0-alpha20190915 -mvsx -O3 -fno-checking -c
tp2khayx.cc
during GIMPLE pass: dom
tp2khayx.cc: In function 'void bg()':
tp2khayx.cc:75:6: internal compiler error: Segmentation fault
   75 | void bg() {
      |      ^~
0x100d316 crash_signal
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-10.0.0_alpha20190915/work/gcc-10-20190915/gcc/toplev.c:326
0x1352cae vr_values::vrp_visit_assignment_or_call(gimple*, tree_node**,
value_range*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-10.0.0_alpha20190915/work/gcc-10-20190915/gcc/vr-values.c:2074
0x1352cae vr_values::vrp_visit_assignment_or_call(gimple*, tree_node**,
value_range*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-10.0.0_alpha20190915/work/gcc-10-20190915/gcc/vr-values.c:2054
0x176ec25 evrp_range_analyzer::record_ranges_from_stmt(gimple*, bool)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-10.0.0_alpha20190915/work/gcc-10-20190915/gcc/gimple-ssa-evrp-analyze.c:307
0x1139cf3 dom_opt_dom_walker::before_dom_children(basic_block_def*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-10.0.0_alpha20190915/work/gcc-10-20190915/gcc/tree-ssa-dom.c:1503
0x174b8a7 dom_walker::walk(basic_block_def*)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-10.0.0_alpha20190915/work/gcc-10-20190915/gcc/domwalk.c:309
0x113764d execute
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-10.0.0_alpha20190915/work/gcc-10-20190915/gcc/tree-ssa-dom.c:724
Reply | Threaded
Open this post in threaded view
|

[Bug tree-optimization/91790] ICE: verify_ssa failed (error: definition in block 2 follows the use)

rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91790

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2019-09-17
             Blocks|                            |53947
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
            Summary|ICE: Segmentation fault (in |ICE: verify_ssa failed
                   |vr_values::vrp_visit_assign |(error: definition in block
                   |ment_or_call), or ICE:      |2 follows the use)
                   |verify_ssa failed (error:   |
                   |definition in block 2       |
                   |follows the use)            |
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Clearly a vectorizer issue.  Somewhat oldish.  Fix

Index: gcc/tree-vect-stmts.c
===================================================================
--- gcc/tree-vect-stmts.c       (revision 275747)
+++ gcc/tree-vect-stmts.c       (working copy)
@@ -9169,7 +9169,9 @@ vectorizable_load (stmt_vec_info stmt_in
        || alignment_support_scheme == dr_explicit_realign)
       && !compute_in_loop)
     {
-      msq = vect_setup_realignment (first_stmt_info, gsi, &realignment_token,
+      msq = vect_setup_realignment (first_stmt_info_for_drptr
+                                   ? first_stmt_info_for_drptr
+                                   : first_stmt_info, gsi, &realignment_token,
                                    alignment_support_scheme, NULL_TREE,
                                    &at_loop);
       if (alignment_support_scheme == dr_explicit_realign_optimized)


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53947
[Bug 53947] [meta-bug] vectorizer missed-optimizations
Reply | Threaded
Open this post in threaded view
|

[Bug tree-optimization/91790] ICE: verify_ssa failed (error: definition in block 2 follows the use)

rguenth at gcc dot gnu.org
In reply to this post by rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91790

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |10.0

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar.  At least GCC 9 is affected as well.
Reply | Threaded
Open this post in threaded view
|

[Bug tree-optimization/91790] ICE: verify_ssa failed (error: definition in block 2 follows the use)

rguenth at gcc dot gnu.org
In reply to this post by rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91790

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Tue Sep 17 08:08:40 2019
New Revision: 275798

URL: https://gcc.gnu.org/viewcvs?rev=275798&root=gcc&view=rev
Log:
2019-09-17  Richard Biener  <[hidden email]>

        PR tree-optimization/91790
        * tree-vect-stmts.c (vectorizable_load): For BB vectorization
        use the correct DR for setting up realignment.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-vect-stmts.c