public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/97929] New: ICE: in exact_div, at poly-int.h:2219 (vect_get_num_vectors)
@ 2020-11-20 14:45 acoplan at gcc dot gnu.org
  2020-11-20 14:46 ` [Bug tree-optimization/97929] [11 Regression] " acoplan at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: acoplan at gcc dot gnu.org @ 2020-11-20 14:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97929
           Summary: ICE: in exact_div, at poly-int.h:2219
                    (vect_get_num_vectors)
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

For the following testcase:

extern int a[];
void b(short c) {
  for (long d; d; d += 1)
    a[d] = -(1 - c);
}

we ICE on AArch64 with:

$ aarch64-elf-gcc -c -O1 -ftree-vectorize test.c
during GIMPLE pass: vect
test.c: In function 'b':
test.c:2:6: internal compiler error: in exact_div, at poly-int.h:2219
    2 | void b(short c) {
      |      ^
0x109cf78 poly_int<2u, poly_result<unsigned long, if_nonpoly<unsigned long,
unsigned long, poly_int_traits<unsigned long>::is_poly>::type,
poly_coeff_pair_traits<unsigned long, if_nonpoly<unsigned long, unsigned long,
poly_int_traits<unsigned long>::is_poly>::type>::result_kind>::type>
exact_div<2u, unsigned long, unsigned long>(poly_int_pod<2u, unsigned long>
const&, unsigned long)
        /home/alecop01/toolchain/src/gcc/gcc/poly-int.h:2219
0x109cf78 poly_int<2u, poly_result<unsigned long, unsigned long,
poly_coeff_pair_traits<unsigned long, unsigned long>::result_kind>::type>
exact_div<2u, unsigned long, unsigned long>(poly_int_pod<2u, unsigned long>
const&, poly_int_pod<2u, unsigned long> const&)
        /home/alecop01/toolchain/src/gcc/gcc/poly-int.h:2232
0x109cf78 vect_get_num_vectors
        /home/alecop01/toolchain/src/gcc/gcc/tree-vectorizer.h:1617
0x109cf78 vect_get_num_copies
        /home/alecop01/toolchain/src/gcc/gcc/tree-vectorizer.h:1628
0x109cf78 vectorizable_conversion
        /home/alecop01/toolchain/src/gcc/gcc/tree-vect-stmts.c:4686
0x10b8f31 vect_analyze_stmt(vec_info*, _stmt_vec_info*, bool*, _slp_tree*,
_slp_instance*, vec<stmt_info_for_cost, va_heap, vl_ptr>*)
        /home/alecop01/toolchain/src/gcc/gcc/tree-vect-stmts.c:10694
0x10d9660 vect_analyze_loop_operations
        /home/alecop01/toolchain/src/gcc/gcc/tree-vect-loop.c:1758
0x10db3be vect_analyze_loop_2
        /home/alecop01/toolchain/src/gcc/gcc/tree-vect-loop.c:2478
0x10db3be vect_analyze_loop(loop*, vec_info_shared*)
        /home/alecop01/toolchain/src/gcc/gcc/tree-vect-loop.c:2925
0x110a3df try_vectorize_loop_1
        /home/alecop01/toolchain/src/gcc/gcc/tree-vectorizer.c:995
0x110a917 try_vectorize_loop
        /home/alecop01/toolchain/src/gcc/gcc/tree-vectorizer.c:1148
0x110acf1 vectorize_loops()
        /home/alecop01/toolchain/src/gcc/gcc/tree-vectorizer.c:1229
0xf95b63 execute
        /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-loop.c:414
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.

I can reproduce this since r11-5165-gd84ba819fe. However, prior to this commit,
the build was broken since r11-5158-gec383f0bd, so the ICE could have been
introduced by any of these commits:

d84ba819fe2 Fix bootstrap
717e22dcd48 Fix gcc.dg/pr97897.c
b08e0ee3018 refactor reassocs get_rank
d8cf8976749 Fix operand_equal_p hash and copare of ODR_TYPE_REF
27842e2a1eb [3/3] [AArch64][vect] vec_widen_lshift pattern
9fc9573f9a5 [2/3] [vect] Add widening add, subtract patterns
ec46904edfe [1/3][aarch64] Add vec_widen patterns to aarch64
ec383f0bdb4 tree-optimization/97901 - ICE propagating out LC PHIs

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

* [Bug tree-optimization/97929] [11 Regression] ICE: in exact_div, at poly-int.h:2219 (vect_get_num_vectors)
  2020-11-20 14:45 [Bug tree-optimization/97929] New: ICE: in exact_div, at poly-int.h:2219 (vect_get_num_vectors) acoplan at gcc dot gnu.org
@ 2020-11-20 14:46 ` acoplan at gcc dot gnu.org
  2020-11-20 14:55 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: acoplan at gcc dot gnu.org @ 2020-11-20 14:46 UTC (permalink / raw)
  To: gcc-bugs

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

Alex Coplan <acoplan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
   Target Milestone|---                         |11.0
                 CC|                            |joel.hutton at arm dot com,
                   |                            |rguenth at gcc dot gnu.org
             Target|                            |aarch64
            Summary|ICE: in exact_div, at       |[11 Regression] ICE: in
                   |poly-int.h:2219             |exact_div, at
                   |(vect_get_num_vectors)      |poly-int.h:2219
                   |                            |(vect_get_num_vectors)
      Known to fail|                            |11.0

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

* [Bug tree-optimization/97929] [11 Regression] ICE: in exact_div, at poly-int.h:2219 (vect_get_num_vectors)
  2020-11-20 14:45 [Bug tree-optimization/97929] New: ICE: in exact_div, at poly-int.h:2219 (vect_get_num_vectors) acoplan at gcc dot gnu.org
  2020-11-20 14:46 ` [Bug tree-optimization/97929] [11 Regression] " acoplan at gcc dot gnu.org
@ 2020-11-20 14:55 ` rguenth at gcc dot gnu.org
  2020-11-20 15:27 ` ktkachov at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-20 14:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
My bet is

9fc9573f9a5 [2/3] [vect] Add widening add, subtract patterns

exposed the latent issue.

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

* [Bug tree-optimization/97929] [11 Regression] ICE: in exact_div, at poly-int.h:2219 (vect_get_num_vectors)
  2020-11-20 14:45 [Bug tree-optimization/97929] New: ICE: in exact_div, at poly-int.h:2219 (vect_get_num_vectors) acoplan at gcc dot gnu.org
  2020-11-20 14:46 ` [Bug tree-optimization/97929] [11 Regression] " acoplan at gcc dot gnu.org
  2020-11-20 14:55 ` rguenth at gcc dot gnu.org
@ 2020-11-20 15:27 ` ktkachov at gcc dot gnu.org
  2020-12-10 11:59 ` cvs-commit at gcc dot gnu.org
  2020-12-10 12:01 ` joelh at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2020-11-20 15:27 UTC (permalink / raw)
  To: gcc-bugs

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

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
      Known to work|                            |10.2.1
           Priority|P3                          |P1
   Last reconfirmed|                            |2020-11-20
                 CC|                            |ktkachov at gcc dot gnu.org

--- Comment #2 from ktkachov at gcc dot gnu.org ---
Confirmed.

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

* [Bug tree-optimization/97929] [11 Regression] ICE: in exact_div, at poly-int.h:2219 (vect_get_num_vectors)
  2020-11-20 14:45 [Bug tree-optimization/97929] New: ICE: in exact_div, at poly-int.h:2219 (vect_get_num_vectors) acoplan at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-11-20 15:27 ` ktkachov at gcc dot gnu.org
@ 2020-12-10 11:59 ` cvs-commit at gcc dot gnu.org
  2020-12-10 12:01 ` joelh at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-10 11:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Joel Hutton <joelh@gcc.gnu.org>:

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

commit r11-5903-gf5b902a9af9d1cce6c540c7f71e02e22e45c23ef
Author: Joel Hutton <joel.hutton@arm.com>
Date:   Thu Dec 10 11:55:18 2020 +0000

    [VECT] pr97929 fix

    This addresses pr97929. The case for WIDEN_PLUS and WIDEN_MINUS were
    missing in vect_get_smallest_scalar_type.

    gcc/ChangeLog:

            PR tree-optimization/97929
            * tree-vect-data-refs.c (vect_get_smallest_scalar_type): Add
            WIDEN_PLUS/WIDEN_MINUS case.

    gcc/testsuite/ChangeLog:

            * gcc.dg/vect/pr97929.c: New test.

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

* [Bug tree-optimization/97929] [11 Regression] ICE: in exact_div, at poly-int.h:2219 (vect_get_num_vectors)
  2020-11-20 14:45 [Bug tree-optimization/97929] New: ICE: in exact_div, at poly-int.h:2219 (vect_get_num_vectors) acoplan at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-12-10 11:59 ` cvs-commit at gcc dot gnu.org
@ 2020-12-10 12:01 ` joelh at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: joelh at gcc dot gnu.org @ 2020-12-10 12:01 UTC (permalink / raw)
  To: gcc-bugs

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

Joel Hutton <joelh at gcc dot gnu.org> changed:

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

--- Comment #4 from Joel Hutton <joelh at gcc dot gnu.org> ---
Fixed on trunk with r11-5903-gf5b902a9af9d1cce6c540c7f71e02e22e45c23ef

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

end of thread, other threads:[~2020-12-10 12:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-20 14:45 [Bug tree-optimization/97929] New: ICE: in exact_div, at poly-int.h:2219 (vect_get_num_vectors) acoplan at gcc dot gnu.org
2020-11-20 14:46 ` [Bug tree-optimization/97929] [11 Regression] " acoplan at gcc dot gnu.org
2020-11-20 14:55 ` rguenth at gcc dot gnu.org
2020-11-20 15:27 ` ktkachov at gcc dot gnu.org
2020-12-10 11:59 ` cvs-commit at gcc dot gnu.org
2020-12-10 12:01 ` joelh 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).