public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/114464] New: [14 regression] ICE when building tdscpp-20240212
@ 2024-03-25 12:12 sjames at gcc dot gnu.org
  2024-03-25 12:32 ` [Bug tree-optimization/114464] " rguenth at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-03-25 12:12 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114464
           Summary: [14 regression] ICE when building tdscpp-20240212
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57808
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57808&action=edit
bcp.cpp.ii.xz

```
$ g++ -c bcp.cpp.ii -O2 -std=gnu++23
/var/tmp/portage/dev-db/tdscpp-20240212/work/tdscpp-20240212/src/bcp.cpp: In
function ‘void tds::bcp_row_data(uint8_t*&, const col_info&, const value&,
std::u16string_view)’:
/var/tmp/portage/dev-db/tdscpp-20240212/work/tdscpp-20240212/src/bcp.cpp:578:10:
error: incompatible types in ‘PHI’ argument 0
  578 |     void bcp_row_data(uint8_t*& ptr, const col_info& col, const value&
vv, u16string_view col_name) {
      |          ^~~~~~~~~~~~
vector(16) unsigned char

vector(16) <signed-boolean:8>

vect_vec_recur_.4107_221 = PHI <mask_b_306.4112_2569(835), { 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }(831)>
/var/tmp/portage/dev-db/tdscpp-20240212/work/tdscpp-20240212/src/bcp.cpp:578:10:
error: type mismatch in ‘vec_perm_expr’
vector(16) unsigned char
vector(16) unsigned char
vector(16) <signed-boolean:8>
vector(16) ssizetype
_2739 = VEC_PERM_EXPR <vect_vec_recur_.4107_221, mask_b_306.4112_2569, { 15,
16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 }>;
during GIMPLE pass: vect
/var/tmp/portage/dev-db/tdscpp-20240212/work/tdscpp-20240212/src/bcp.cpp:578:10:
internal compiler error: verify_gimple failed
0x558d86f1abae verify_gimple_in_cfg(function*, bool, bool)
       
/usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/tree-cfg.cc:5663
0x558d886683f4 execute_function_todo
        /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/passes.cc:2088
0x558d886683f4 do_per_function
        /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/passes.cc:1687
0x558d886683f4 execute_todo
        /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/passes.cc:2142
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```

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

* [Bug tree-optimization/114464] [14 regression] ICE when building tdscpp-20240212
  2024-03-25 12:12 [Bug middle-end/114464] New: [14 regression] ICE when building tdscpp-20240212 sjames at gcc dot gnu.org
@ 2024-03-25 12:32 ` rguenth at gcc dot gnu.org
  2024-03-25 12:33 ` sjames at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-03-25 12:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code,
                   |                            |needs-reduction
   Target Milestone|---                         |14.0
                 CC|                            |rguenth at gcc dot gnu.org
          Component|middle-end                  |tree-optimization

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
x86-64?

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

* [Bug tree-optimization/114464] [14 regression] ICE when building tdscpp-20240212
  2024-03-25 12:12 [Bug middle-end/114464] New: [14 regression] ICE when building tdscpp-20240212 sjames at gcc dot gnu.org
  2024-03-25 12:32 ` [Bug tree-optimization/114464] " rguenth at gcc dot gnu.org
@ 2024-03-25 12:33 ` sjames at gcc dot gnu.org
  2024-03-25 21:33 ` sjames at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-03-25 12:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Sam James <sjames at gcc dot gnu.org> ---
Ah, yes, sorry. Reducing too.

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

* [Bug tree-optimization/114464] [14 regression] ICE when building tdscpp-20240212
  2024-03-25 12:12 [Bug middle-end/114464] New: [14 regression] ICE when building tdscpp-20240212 sjames at gcc dot gnu.org
  2024-03-25 12:32 ` [Bug tree-optimization/114464] " rguenth at gcc dot gnu.org
  2024-03-25 12:33 ` sjames at gcc dot gnu.org
@ 2024-03-25 21:33 ` sjames at gcc dot gnu.org
  2024-03-25 21:51 ` xry111 at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-03-25 21:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Sam James <sjames at gcc dot gnu.org> ---
Reduced:
```
template <int N> void double_to_int(double, unsigned char *scratch, bool carry)
{
  for (int i = 0; i < N; i++) {
    bool b = scratch[i] <<= 1;
    if (carry)
      scratch[i] |= 1;
    carry = b;
  }
}
double bcp_row_data_d;
unsigned char bcp_row_data_ptr;
bool carry;
void bcp_row_data() { double_to_int<16>(bcp_row_data_d, &bcp_row_data_ptr,
carry); }
```

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

* [Bug tree-optimization/114464] [14 regression] ICE when building tdscpp-20240212
  2024-03-25 12:12 [Bug middle-end/114464] New: [14 regression] ICE when building tdscpp-20240212 sjames at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-03-25 21:33 ` sjames at gcc dot gnu.org
@ 2024-03-25 21:51 ` xry111 at gcc dot gnu.org
  2024-03-25 23:13 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: xry111 at gcc dot gnu.org @ 2024-03-25 21:51 UTC (permalink / raw)
  To: gcc-bugs

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

Xi Ruoyao <xry111 at gcc dot gnu.org> changed:

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

--- Comment #4 from Xi Ruoyao <xry111 at gcc dot gnu.org> ---
Interestingly, this only happens when N % 16 == 0.

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

* [Bug tree-optimization/114464] [14 regression] ICE when building tdscpp-20240212
  2024-03-25 12:12 [Bug middle-end/114464] New: [14 regression] ICE when building tdscpp-20240212 sjames at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-03-25 21:51 ` xry111 at gcc dot gnu.org
@ 2024-03-25 23:13 ` pinskia at gcc dot gnu.org
  2024-03-25 23:15 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-25 23:13 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |pinskia at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2024-03-25
           Keywords|                            |needs-bisection

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Better reduced testcase (removes the template and unused arguments):
```
void h(unsigned char *scratch, bool carry) {
  for (int i = 0; i < 16; i++) {
    bool b = scratch[i] <<= 1;
    if (carry)
      scratch[i] |= 1;
    carry = b;
  }
}
```

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

* [Bug tree-optimization/114464] [14 regression] ICE when building tdscpp-20240212
  2024-03-25 12:12 [Bug middle-end/114464] New: [14 regression] ICE when building tdscpp-20240212 sjames at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-03-25 23:13 ` pinskia at gcc dot gnu.org
@ 2024-03-25 23:15 ` pinskia at gcc dot gnu.org
  2024-03-26  8:22 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-03-25 23:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Xi Ruoyao from comment #4)
> Interestingly, this only happens when N % 16 == 0.

That depends on the target, for aarch64 (and arm with neon enabled), GCC ICEs
for all multiplies of 8, while x86_64 is multiples of 16.

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

* [Bug tree-optimization/114464] [14 regression] ICE when building tdscpp-20240212
  2024-03-25 12:12 [Bug middle-end/114464] New: [14 regression] ICE when building tdscpp-20240212 sjames at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2024-03-25 23:15 ` pinskia at gcc dot gnu.org
@ 2024-03-26  8:22 ` rguenth at gcc dot gnu.org
  2024-03-26  9:38 ` cvs-commit at gcc dot gnu.org
  2024-03-26  9:44 ` rguenth at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-03-26  8:22 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.

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

* [Bug tree-optimization/114464] [14 regression] ICE when building tdscpp-20240212
  2024-03-25 12:12 [Bug middle-end/114464] New: [14 regression] ICE when building tdscpp-20240212 sjames at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2024-03-26  8:22 ` rguenth at gcc dot gnu.org
@ 2024-03-26  9:38 ` cvs-commit at gcc dot gnu.org
  2024-03-26  9:44 ` rguenth at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-26  9:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:226a220d0056396e825e12435cc0da52cbd5ac56

commit r14-9665-g226a220d0056396e825e12435cc0da52cbd5ac56
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Mar 26 09:39:30 2024 +0100

    tree-optimization/114464 - verify types in recurrence vectorization

    The following adds missing verification of vector type compatibility
    to recurrence vectorization.

            PR tree-optimization/114464
            * tree-vect-loop.cc (vectorizable_recurr): Verify the latch
            vector type is compatible with what we chose for the recurrence.

            * g++.dg/vect/pr114464.cc: New testcase.

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

* [Bug tree-optimization/114464] [14 regression] ICE when building tdscpp-20240212
  2024-03-25 12:12 [Bug middle-end/114464] New: [14 regression] ICE when building tdscpp-20240212 sjames at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2024-03-26  9:38 ` cvs-commit at gcc dot gnu.org
@ 2024-03-26  9:44 ` rguenth at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-03-26  9:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed (but possibly latent in GCC 13).

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

end of thread, other threads:[~2024-03-26  9:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-25 12:12 [Bug middle-end/114464] New: [14 regression] ICE when building tdscpp-20240212 sjames at gcc dot gnu.org
2024-03-25 12:32 ` [Bug tree-optimization/114464] " rguenth at gcc dot gnu.org
2024-03-25 12:33 ` sjames at gcc dot gnu.org
2024-03-25 21:33 ` sjames at gcc dot gnu.org
2024-03-25 21:51 ` xry111 at gcc dot gnu.org
2024-03-25 23:13 ` pinskia at gcc dot gnu.org
2024-03-25 23:15 ` pinskia at gcc dot gnu.org
2024-03-26  8:22 ` rguenth at gcc dot gnu.org
2024-03-26  9:38 ` cvs-commit at gcc dot gnu.org
2024-03-26  9:44 ` rguenth 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).