public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/108950] New: [11/12/13 Regression] ICE: verify_gimple failed (error: conversion of register to a different size in 'view_convert_expr'; error: type mismatch in 'widen_sum_expr')
@ 2023-02-27 12:46 asolokha at gmx dot com
  2023-02-27 15:47 ` [Bug target/108950] [11/12/13 Regression] ICE: verify_gimple failed (error: conversion of register to a different size in 'view_convert_expr'; error: type mismatch in 'widen_sum_expr') since r11-418-g584a3c080bbd6e marxin at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: asolokha at gmx dot com @ 2023-02-27 12:46 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108950
           Summary: [11/12/13 Regression] ICE: verify_gimple failed
                    (error: conversion of register to a different size in
                    'view_convert_expr'; error: type mismatch in
                    'widen_sum_expr')
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: aarch64-linux-gnu

gcc 13.0.1 20230226 snapshot (g:e6d39f68d03c46637ca6e1bede3d28eae6278df3) ICEs
when compiling the following testcase w/ -O1:

int m;
short int n;

__attribute__ ((simd)) int
foo (void)
{
  m += n;
  m += n;
}

% aarch64-linux-gnu-gcc-13 -O1 -c t0pgrthf.c
t0pgrthf.c: In function 'foo.simdclone.0':
t0pgrthf.c:5:1: error: conversion of register to a different size in
'view_convert_expr'
    5 | foo (void)
      | ^~~
VIEW_CONVERT_EXPR<int>(n.0_1);

_21 = VIEW_CONVERT_EXPR<int>(n.0_1);
t0pgrthf.c:5:1: error: type mismatch in 'widen_sum_expr'
vector(4) int
vector(4) int
vector(4) int
vect_patt_19.21_28 = _25 w+ vect_m_lsm.20_27;
during GIMPLE pass: vect
t0pgrthf.c:5:1: internal compiler error: verify_gimple failed
0xf7c152 verify_gimple_in_cfg(function*, bool, bool)
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230226/work/gcc-13-20230226/gcc/tree-cfg.cc:5648
0xe39450 execute_function_todo
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230226/work/gcc-13-20230226/gcc/passes.cc:2091
0xe3993e execute_todo
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-13.0.1_p20230226/work/gcc-13-20230226/gcc/passes.cc:2145

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

* [Bug target/108950] [11/12/13 Regression] ICE: verify_gimple failed (error: conversion of register to a different size in 'view_convert_expr'; error: type mismatch in 'widen_sum_expr') since r11-418-g584a3c080bbd6e
  2023-02-27 12:46 [Bug target/108950] New: [11/12/13 Regression] ICE: verify_gimple failed (error: conversion of register to a different size in 'view_convert_expr'; error: type mismatch in 'widen_sum_expr') asolokha at gmx dot com
@ 2023-02-27 15:47 ` marxin at gcc dot gnu.org
  2023-02-28 10:40 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2023-02-27 15:47 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2023-02-27
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org
            Summary|[11/12/13 Regression] ICE:  |[11/12/13 Regression] ICE:
                   |verify_gimple failed        |verify_gimple failed
                   |(error: conversion of       |(error: conversion of
                   |register to a different     |register to a different
                   |size in                     |size in
                   |'view_convert_expr'; error: |'view_convert_expr'; error:
                   |type mismatch in            |type mismatch in
                   |'widen_sum_expr')           |'widen_sum_expr') since
                   |                            |r11-418-g584a3c080bbd6e
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r11-418-g584a3c080bbd6e.

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

* [Bug target/108950] [11/12/13 Regression] ICE: verify_gimple failed (error: conversion of register to a different size in 'view_convert_expr'; error: type mismatch in 'widen_sum_expr') since r11-418-g584a3c080bbd6e
  2023-02-27 12:46 [Bug target/108950] New: [11/12/13 Regression] ICE: verify_gimple failed (error: conversion of register to a different size in 'view_convert_expr'; error: type mismatch in 'widen_sum_expr') asolokha at gmx dot com
  2023-02-27 15:47 ` [Bug target/108950] [11/12/13 Regression] ICE: verify_gimple failed (error: conversion of register to a different size in 'view_convert_expr'; error: type mismatch in 'widen_sum_expr') since r11-418-g584a3c080bbd6e marxin at gcc dot gnu.org
@ 2023-02-28 10:40 ` rguenth at gcc dot gnu.org
  2023-02-28 14:30 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-02-28 10:40 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
             Status|NEW                         |ASSIGNED
   Target Milestone|---                         |11.4
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
I will have a look.

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

* [Bug target/108950] [11/12/13 Regression] ICE: verify_gimple failed (error: conversion of register to a different size in 'view_convert_expr'; error: type mismatch in 'widen_sum_expr') since r11-418-g584a3c080bbd6e
  2023-02-27 12:46 [Bug target/108950] New: [11/12/13 Regression] ICE: verify_gimple failed (error: conversion of register to a different size in 'view_convert_expr'; error: type mismatch in 'widen_sum_expr') asolokha at gmx dot com
  2023-02-27 15:47 ` [Bug target/108950] [11/12/13 Regression] ICE: verify_gimple failed (error: conversion of register to a different size in 'view_convert_expr'; error: type mismatch in 'widen_sum_expr') since r11-418-g584a3c080bbd6e marxin at gcc dot gnu.org
  2023-02-28 10:40 ` rguenth at gcc dot gnu.org
@ 2023-02-28 14:30 ` rguenth at gcc dot gnu.org
  2023-03-01  7:37 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-02-28 14:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
It's because we do

  if (slp_node
      && !(!single_defuse_cycle
           && !lane_reduc_code_p
           && reduction_type != FOLD_LEFT_REDUCTION))
    for (i = 0; i < (int) op.num_ops; i++)
      if (!vect_maybe_update_slp_op_vectype (slp_op[i], vectype_op[i]))
        {
          if (dump_enabled_p ())
            dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
                             "incompatible vector types for invariants\n");
          return false;
        }

for the invariant lower precision op of the reduction.  Arguably that's
not efficient.  We're detecting a widen_sum from

  n.0_1 = n;
  _2 = (int) n.0_1;
  m_lsm.19_13 = m;

  <bb 3> [local count: 1073741824]:
  # iter.6_8 = PHI <0(2), iter.6_9(5)>
  # m_lsm.19_12 = PHI <m_lsm.19_13(2), _5(5)>
  # ivtmp_7 = PHI <2(2), ivtmp_18(5)>
  _4 = _2 + m_lsm.19_12;

which is where we could fix this.  I have a patch for the reduction code
for now.

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

* [Bug target/108950] [11/12/13 Regression] ICE: verify_gimple failed (error: conversion of register to a different size in 'view_convert_expr'; error: type mismatch in 'widen_sum_expr') since r11-418-g584a3c080bbd6e
  2023-02-27 12:46 [Bug target/108950] New: [11/12/13 Regression] ICE: verify_gimple failed (error: conversion of register to a different size in 'view_convert_expr'; error: type mismatch in 'widen_sum_expr') asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2023-02-28 14:30 ` rguenth at gcc dot gnu.org
@ 2023-03-01  7:37 ` cvs-commit at gcc dot gnu.org
  2023-03-15  9:48 ` [Bug target/108950] [11/12 " cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-01  7:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS 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:e3837b6f6c28a1d2cea3a69efbda795ea3fb8816

commit r13-6384-ge3837b6f6c28a1d2cea3a69efbda795ea3fb8816
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Feb 28 15:34:27 2023 +0100

    tree-optimization/108950 - widen-sum reduction ICE

    When we end up with a widen-sum with an invariant smaller operand
    the reduction code uses a wrong vector type for it, causing
    IL checking ICEs.  The following fixes that and the inefficiency
    of using a widen-sum with a widenend invariant operand as well
    by actually performing the check the following comment wants.

            PR tree-optimization/108950
            * tree-vect-patterns.cc (vect_recog_widen_sum_pattern):
            Check oprnd0 is defined in the loop.
            * tree-vect-loop.cc (vectorizable_reduction): Record all
            operands vector types, compute that of invariants and
            properly update their SLP nodes.

            * gcc.dg/vect/pr108950.c: New testcase.

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

* [Bug target/108950] [11/12 Regression] ICE: verify_gimple failed (error: conversion of register to a different size in 'view_convert_expr'; error: type mismatch in 'widen_sum_expr') since r11-418-g584a3c080bbd6e
  2023-02-27 12:46 [Bug target/108950] New: [11/12/13 Regression] ICE: verify_gimple failed (error: conversion of register to a different size in 'view_convert_expr'; error: type mismatch in 'widen_sum_expr') asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2023-03-01  7:37 ` cvs-commit at gcc dot gnu.org
@ 2023-03-15  9:48 ` cvs-commit at gcc dot gnu.org
  2023-05-09 10:31 ` [Bug target/108950] [11 " cvs-commit at gcc dot gnu.org
  2023-05-09 10:31 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-03-15  9:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

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

commit r12-9262-gf4e4108dd005084fc1c88bba14fda6b200e70daa
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Feb 28 15:34:27 2023 +0100

    tree-optimization/108950 - widen-sum reduction ICE

    When we end up with a widen-sum with an invariant smaller operand
    the reduction code uses a wrong vector type for it, causing
    IL checking ICEs.  The following fixes that and the inefficiency
    of using a widen-sum with a widenend invariant operand as well
    by actually performing the check the following comment wants.

            PR tree-optimization/108950
            * tree-vect-patterns.cc (vect_recog_widen_sum_pattern):
            Check oprnd0 is defined in the loop.
            * tree-vect-loop.cc (vectorizable_reduction): Record all
            operands vector types, compute that of invariants and
            properly update their SLP nodes.

            * gcc.dg/vect/pr108950.c: New testcase.

    (cherry picked from commit e3837b6f6c28a1d2cea3a69efbda795ea3fb8816)

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

* [Bug target/108950] [11 Regression] ICE: verify_gimple failed (error: conversion of register to a different size in 'view_convert_expr'; error: type mismatch in 'widen_sum_expr') since r11-418-g584a3c080bbd6e
  2023-02-27 12:46 [Bug target/108950] New: [11/12/13 Regression] ICE: verify_gimple failed (error: conversion of register to a different size in 'view_convert_expr'; error: type mismatch in 'widen_sum_expr') asolokha at gmx dot com
                   ` (4 preceding siblings ...)
  2023-03-15  9:48 ` [Bug target/108950] [11/12 " cvs-commit at gcc dot gnu.org
@ 2023-05-09 10:31 ` cvs-commit at gcc dot gnu.org
  2023-05-09 10:31 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-09 10:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Richard Biener
<rguenth@gcc.gnu.org>:

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

commit r11-10752-gd4cbcb9e45c6d45cdbc15583e1a418c13150d8c7
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Feb 28 15:34:27 2023 +0100

    tree-optimization/108950 - widen-sum reduction ICE

    When we end up with a widen-sum with an invariant smaller operand
    the reduction code uses a wrong vector type for it, causing
    IL checking ICEs.  The following fixes that and the inefficiency
    of using a widen-sum with a widenend invariant operand as well
    by actually performing the check the following comment wants.

            PR tree-optimization/108950
            * tree-vect-patterns.c (vect_recog_widen_sum_pattern):
            Check oprnd0 is defined in the loop.
            * tree-vect-loop.c (vectorizable_reduction): Record all
            operands vector types, compute that of invariants and
            properly update their SLP nodes.

            * gcc.dg/vect/pr108950.c: New testcase.

    (cherry picked from commit e3837b6f6c28a1d2cea3a69efbda795ea3fb8816)

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

* [Bug target/108950] [11 Regression] ICE: verify_gimple failed (error: conversion of register to a different size in 'view_convert_expr'; error: type mismatch in 'widen_sum_expr') since r11-418-g584a3c080bbd6e
  2023-02-27 12:46 [Bug target/108950] New: [11/12/13 Regression] ICE: verify_gimple failed (error: conversion of register to a different size in 'view_convert_expr'; error: type mismatch in 'widen_sum_expr') asolokha at gmx dot com
                   ` (5 preceding siblings ...)
  2023-05-09 10:31 ` [Bug target/108950] [11 " cvs-commit at gcc dot gnu.org
@ 2023-05-09 10:31 ` rguenth at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-09 10:31 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
      Known to fail|                            |11.3.0
      Known to work|                            |11.3.1

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

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

end of thread, other threads:[~2023-05-09 10:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-27 12:46 [Bug target/108950] New: [11/12/13 Regression] ICE: verify_gimple failed (error: conversion of register to a different size in 'view_convert_expr'; error: type mismatch in 'widen_sum_expr') asolokha at gmx dot com
2023-02-27 15:47 ` [Bug target/108950] [11/12/13 Regression] ICE: verify_gimple failed (error: conversion of register to a different size in 'view_convert_expr'; error: type mismatch in 'widen_sum_expr') since r11-418-g584a3c080bbd6e marxin at gcc dot gnu.org
2023-02-28 10:40 ` rguenth at gcc dot gnu.org
2023-02-28 14:30 ` rguenth at gcc dot gnu.org
2023-03-01  7:37 ` cvs-commit at gcc dot gnu.org
2023-03-15  9:48 ` [Bug target/108950] [11/12 " cvs-commit at gcc dot gnu.org
2023-05-09 10:31 ` [Bug target/108950] [11 " cvs-commit at gcc dot gnu.org
2023-05-09 10:31 ` 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).