public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/113322] New: [14 Regression] internal compiler error: tree check: expected none of vector_type, have vector_type in expand_single_bit_test, at expr.cc:13375
@ 2024-01-11  3:52 zhangjungcc at gmail dot com
  2024-01-11  3:58 ` [Bug middle-end/113322] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: zhangjungcc at gmail dot com @ 2024-01-11  3:52 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113322
           Summary: [14 Regression] internal compiler error: tree check:
                    expected none of vector_type, have vector_type in
                    expand_single_bit_test, at expr.cc:13375
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zhangjungcc at gmail dot com
  Target Milestone: ---

https://godbolt.org/z/b98WcM9h5

c code:
float a[16];
void 
foo ()
{
int i;
for (i = 0; i < 16/2; i++)
 {
 if (a[2*i+((0 +1)%2)] != (3 * (2*i+((0 +1)%2)) + 2))
  __builtin_abort ();
 }
}


during RTL pass: expand
<source>: In function 'void foo()':
<source>:9:9: internal compiler error: tree check: expected none of
vector_type, have vector_type in expand_single_bit_test, at expr.cc:13375
    9 |  if (a[2*i+((0 +1)%2)] != (3 * (2*i+((0 +1)%2)) + 2))
      |        ~^~
0x263e8ac internal_error(char const*, ...)
        ???:0
0x9640f2 tree_not_check_failed(tree_node const*, char const*, int, char const*,
...)
        ???:0
0xf59501 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        ???:0
0xf6137f expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ???:0
0xf5982a expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        ???:0
0xf6137f expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ???:0
0xf592f5 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        ???:0
0xf6137f expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ???:0
0xf63cf4 expand_operands(tree_node*, tree_node*, rtx_def*, rtx_def**,
rtx_def**, expand_modifier)
        ???:0
0xf5a01d expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned: 1

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

* [Bug middle-end/113322] [14 Regression] internal compiler error: tree check: expected none of vector_type, have vector_type in expand_single_bit_test, at expr.cc:13375
  2024-01-11  3:52 [Bug middle-end/113322] New: [14 Regression] internal compiler error: tree check: expected none of vector_type, have vector_type in expand_single_bit_test, at expr.cc:13375 zhangjungcc at gmail dot com
@ 2024-01-11  3:58 ` pinskia at gcc dot gnu.org
  2024-01-11  4:03 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-11  3:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
   Target Milestone|---                         |14.0

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

* [Bug middle-end/113322] [14 Regression] internal compiler error: tree check: expected none of vector_type, have vector_type in expand_single_bit_test, at expr.cc:13375
  2024-01-11  3:52 [Bug middle-end/113322] New: [14 Regression] internal compiler error: tree check: expected none of vector_type, have vector_type in expand_single_bit_test, at expr.cc:13375 zhangjungcc at gmail dot com
  2024-01-11  3:58 ` [Bug middle-end/113322] " pinskia at gcc dot gnu.org
@ 2024-01-11  4:03 ` pinskia at gcc dot gnu.org
  2024-01-11  4:28 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-11  4:03 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-01-11
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I am going to fix this, it was exposed by the recent vectorizer patches but
this area I touched last.

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

* [Bug middle-end/113322] [14 Regression] internal compiler error: tree check: expected none of vector_type, have vector_type in expand_single_bit_test, at expr.cc:13375
  2024-01-11  3:52 [Bug middle-end/113322] New: [14 Regression] internal compiler error: tree check: expected none of vector_type, have vector_type in expand_single_bit_test, at expr.cc:13375 zhangjungcc at gmail dot com
  2024-01-11  3:58 ` [Bug middle-end/113322] " pinskia at gcc dot gnu.org
  2024-01-11  4:03 ` pinskia at gcc dot gnu.org
@ 2024-01-11  4:28 ` pinskia at gcc dot gnu.org
  2024-01-11  9:05 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-11  4:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
`-O3 -g0 -march=sapphirerapids`

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

* [Bug middle-end/113322] [14 Regression] internal compiler error: tree check: expected none of vector_type, have vector_type in expand_single_bit_test, at expr.cc:13375
  2024-01-11  3:52 [Bug middle-end/113322] New: [14 Regression] internal compiler error: tree check: expected none of vector_type, have vector_type in expand_single_bit_test, at expr.cc:13375 zhangjungcc at gmail dot com
                   ` (2 preceding siblings ...)
  2024-01-11  4:28 ` pinskia at gcc dot gnu.org
@ 2024-01-11  9:05 ` rguenth at gcc dot gnu.org
  2024-01-11 18:01 ` cvs-commit at gcc dot gnu.org
  2024-01-11 18:03 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-11  9:05 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |x86_64-*-*
           Priority|P3                          |P1

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

* [Bug middle-end/113322] [14 Regression] internal compiler error: tree check: expected none of vector_type, have vector_type in expand_single_bit_test, at expr.cc:13375
  2024-01-11  3:52 [Bug middle-end/113322] New: [14 Regression] internal compiler error: tree check: expected none of vector_type, have vector_type in expand_single_bit_test, at expr.cc:13375 zhangjungcc at gmail dot com
                   ` (3 preceding siblings ...)
  2024-01-11  9:05 ` rguenth at gcc dot gnu.org
@ 2024-01-11 18:01 ` cvs-commit at gcc dot gnu.org
  2024-01-11 18:03 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-11 18:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:

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

commit r14-7149-ga2be4e155992151b60fca6969a97d6efd91e82b5
Author: Andrew Pinski <quic_apinski@quicinc.com>
Date:   Wed Jan 10 22:13:03 2024 -0800

    expr: Limit the store flag optimization for single bit to non-vectors
[PR113322]

    The problem here is after the recent vectorizer improvements, we end up
    with a comparison against a vector bool 0 which then tries
expand_single_bit_test
    which is not expecting vector comparisons at all.

    The IR was:
      vector(4) <signed-boolean:1> mask_patt_5.13;
      _Bool _12;

      mask_patt_5.13_44 = vect_perm_even_41 != { 0.0, 1.0e+0, 2.0e+0, 3.0e+0 };
      _12 = mask_patt_5.13_44 == { 0, 0, 0, 0 };

    and we tried to call expand_single_bit_test for the last comparison.
    Rejecting the vector comparison is needed.

    Bootstrapped and tested on x86_64-linux-gnu with no regressions.

            PR middle-end/113322

    gcc/ChangeLog:

            * expr.cc (do_store_flag): Don't try single bit tests with
            comparison on vector types.

    gcc/testsuite/ChangeLog:

            * gcc.c-torture/compile/pr113322-1.c: New test.

    Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>

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

* [Bug middle-end/113322] [14 Regression] internal compiler error: tree check: expected none of vector_type, have vector_type in expand_single_bit_test, at expr.cc:13375
  2024-01-11  3:52 [Bug middle-end/113322] New: [14 Regression] internal compiler error: tree check: expected none of vector_type, have vector_type in expand_single_bit_test, at expr.cc:13375 zhangjungcc at gmail dot com
                   ` (4 preceding siblings ...)
  2024-01-11 18:01 ` cvs-commit at gcc dot gnu.org
@ 2024-01-11 18:03 ` pinskia at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-11 18:03 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2024-01-11 18:03 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-11  3:52 [Bug middle-end/113322] New: [14 Regression] internal compiler error: tree check: expected none of vector_type, have vector_type in expand_single_bit_test, at expr.cc:13375 zhangjungcc at gmail dot com
2024-01-11  3:58 ` [Bug middle-end/113322] " pinskia at gcc dot gnu.org
2024-01-11  4:03 ` pinskia at gcc dot gnu.org
2024-01-11  4:28 ` pinskia at gcc dot gnu.org
2024-01-11  9:05 ` rguenth at gcc dot gnu.org
2024-01-11 18:01 ` cvs-commit at gcc dot gnu.org
2024-01-11 18:03 ` 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).