public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/102324] New: ICE in initialize_matrix_A, at tree-data-ref.c:3959
@ 2021-09-14 11:05 ktkachov at gcc dot gnu.org
  2021-09-14 11:05 ` [Bug tree-optimization/102324] " ktkachov at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2021-09-14 11:05 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102324
           Summary: ICE in initialize_matrix_A, at tree-data-ref.c:3959
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ktkachov at gcc dot gnu.org
  Target Milestone: ---

The AArch64 SVE ACLE testcase below

#include <arm_sve.h>
svint8_t doit(svbool_t ptrue, svint8_t m0) {
auto combine_low =
    [&ptrue]( svint8_t in) -> svint8_t {
        int8_t data [2000];
        svst1(ptrue, (int8_t *)data, in);
        for (int _i = (int)svcntb()/2; _i < (int)svcntb(); ++_i)
            data[_i] = data[_i-(int)svcntb()];
        in = svld1(ptrue, data);
        return in;
    };
return combine_low(m0);

}

ICEs with -march=armv8-a+sve -O2 
ice.cc: In lambda function:
ice.cc:4:5: internal compiler error: in initialize_matrix_A, at
tree-data-ref.c:3959
    4 |     [&ptrue]( svint8_t in) -> svint8_t {
      |     ^
0x1ed2988 initialize_matrix_A
        $SRC/gcc/tree-data-ref.c:3959
0x1ed2965 initialize_matrix_A
        $SRC/gcc/tree-data-ref.c:3929
0x1ed8454 analyze_subscript_affine_affine
        $SRC/gcc/tree-data-ref.c:4361
0x1edb8fd analyze_siv_subscript
        $SRC/gcc/tree-data-ref.c:4703
0x1edb8fd analyze_overlapping_iterations
        $SRC/gcc/tree-data-ref.c:4933
0x1edb8fd subscript_dependence_tester_1
        $SRC/gcc/tree-data-ref.c:5487
0x1edc10c subscript_dependence_tester
        $SRC/gcc/tree-data-ref.c:5537
0x1edc10c compute_affine_dependence(data_dependence_relation*, loop*)
        $SRC/gcc/tree-data-ref.c:5597
0x118ea4d loop_distribution::get_data_dependence(graph*, data_reference*,
data_reference*)
        $SRC/gcc/tree-loop-distribution.c:1379
0x118eaba loop_distribution::data_dep_in_cycle_p(graph*, data_reference*,
data_reference*)
        $SRC/gcc/tree-loop-distribution.c:1398
0x118ed49 loop_distribution::update_type_for_merge(graph*, partition*,
partition*)
        $SRC/gcc/tree-loop-distribution.c:1441
0x118f927 loop_distribution::build_rdg_partition_for_vertex(graph*, int)
        $SRC/gcc/tree-loop-distribution.c:1485
0x118fb51 loop_distribution::rdg_build_partitions(graph*, vec<gimple*, va_heap,
vl_ptr>, vec<partition*, va_heap, vl_ptr>*)
        $SRC/gcc/tree-loop-distribution.c:1938
0x1191c19 loop_distribution::distribute_loop(loop*, vec<gimple*, va_heap,
vl_ptr> const&, control_dependences*, int*, bool*, bool)
        $SRC/gcc/tree-loop-distribution.c:2984
0x11940f8 loop_distribution::execute(function*)
        $SRC/gcc/tree-loop-distribution.c:3353
0x119508d execute
        $SRC/gcc/tree-loop-distribution.c:3441
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

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

* [Bug tree-optimization/102324] ICE in initialize_matrix_A, at tree-data-ref.c:3959
  2021-09-14 11:05 [Bug tree-optimization/102324] New: ICE in initialize_matrix_A, at tree-data-ref.c:3959 ktkachov at gcc dot gnu.org
@ 2021-09-14 11:05 ` ktkachov at gcc dot gnu.org
  2021-09-14 12:01 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2021-09-14 11:05 UTC (permalink / raw)
  To: gcc-bugs

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

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |10.4
             Target|                            |aarch64
      Known to fail|                            |10.3.1, 11.1.1, 12.0

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

* [Bug tree-optimization/102324] ICE in initialize_matrix_A, at tree-data-ref.c:3959
  2021-09-14 11:05 [Bug tree-optimization/102324] New: ICE in initialize_matrix_A, at tree-data-ref.c:3959 ktkachov at gcc dot gnu.org
  2021-09-14 11:05 ` [Bug tree-optimization/102324] " ktkachov at gcc dot gnu.org
@ 2021-09-14 12:01 ` rguenth at gcc dot gnu.org
  2021-09-14 16:30 ` rsandifo at gcc dot gnu.org
  2021-09-14 22:58 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-09-14 12:01 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
So likely we're seeing a POLY_INT here which could eventually be handled the
same as an INTEGER_CST but the question is what to do else (well, return
chrec_dont_know).

Somebody needs to verify whether the dependence compute resulting is sane
(or gracefully fails).

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

* [Bug tree-optimization/102324] ICE in initialize_matrix_A, at tree-data-ref.c:3959
  2021-09-14 11:05 [Bug tree-optimization/102324] New: ICE in initialize_matrix_A, at tree-data-ref.c:3959 ktkachov at gcc dot gnu.org
  2021-09-14 11:05 ` [Bug tree-optimization/102324] " ktkachov at gcc dot gnu.org
  2021-09-14 12:01 ` rguenth at gcc dot gnu.org
@ 2021-09-14 16:30 ` rsandifo at gcc dot gnu.org
  2021-09-14 22:58 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2021-09-14 16:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #1)
> So likely we're seeing a POLY_INT here which could eventually be handled the
> same as an INTEGER_CST but the question is what to do else (well, return
> chrec_dont_know).
Well, following previous discussion about SCEVs, the agreement was
to treat POLY_INT_CSTs as symbolic.  The only caller of initialize_matrix_A
is analyze_subscript_affine_affine, which says:

/* Determines the overlapping elements due to accesses CHREC_A and
   CHREC_B, that are affine functions.  This function cannot handle
   symbolic evolution functions, ie. when initial conditions are
   parameters, because it uses lambda matrices of integers.  */

So I guess one question is why we're still seeing symbolic chrecs
despite that.

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

* [Bug tree-optimization/102324] ICE in initialize_matrix_A, at tree-data-ref.c:3959
  2021-09-14 11:05 [Bug tree-optimization/102324] New: ICE in initialize_matrix_A, at tree-data-ref.c:3959 ktkachov at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-09-14 16:30 ` rsandifo at gcc dot gnu.org
@ 2021-09-14 22:58 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-14 22:58 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |---
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-09-14

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase (removing the C++ lambda):

#include <arm_sve.h>
svint8_t doit(svbool_t ptrue, svint8_t in) {
    int8_t data [2000];
    svst1(ptrue, (int8_t *)data, in);
    for (int _i = (int)svcntb()/2; _i < (int)svcntb(); ++_i)
        data[_i] = data[_i-(int)svcntb()];
    in = svld1(ptrue, data);
    return in;
}

Confirmed.


ldist asked to generate code for vertex 3
(compute_affine_dependence
  stmt_a: _2 = data[_1];
  stmt_b: data[_i_16] = _2;
(analyze_overlapping_iterations 
  (chrec_a = {_i_9 - POLY_INT_CST [16, 16], +, 1}_1)
  (chrec_b = {_i_9, +, 1}_1)
(analyze_siv_subscript 
can_use_subscript_aff_aff_for_symbolic 
(analyze_subscript_affine_affine

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

end of thread, other threads:[~2021-09-14 22:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-14 11:05 [Bug tree-optimization/102324] New: ICE in initialize_matrix_A, at tree-data-ref.c:3959 ktkachov at gcc dot gnu.org
2021-09-14 11:05 ` [Bug tree-optimization/102324] " ktkachov at gcc dot gnu.org
2021-09-14 12:01 ` rguenth at gcc dot gnu.org
2021-09-14 16:30 ` rsandifo at gcc dot gnu.org
2021-09-14 22:58 ` pinskia 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).