public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/114070] New: [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model
@ 2024-02-23  7:28 sjames at gcc dot gnu.org
  2024-02-23  7:29 ` [Bug rtl-optimization/114070] " sjames at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-02-23  7:28 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114070
           Summary: [12/13/13 regression] ICE when building git-2.43.2
                    with -mcpu=niagara4 -fno-vect-cost-model
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57506
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57506&action=edit
merge-tree.i.xz

I'm not sure if this is an rtl-optimization bug or a target bug.

```
sparc64-unknown-linux-gnu-gcc -o builtin/merge-tree.o -c -MF
builtin/.depend/merge-tree.o.d -MQ builtin/merge-tree.o -MMD -MP    -O3
-mcpu=niagara4 -pipe -fno-semantic-interposition -fno-vect-cost-model
-U_FORTIFY_SOURCE -fno-hardened -I. -DHAVE_SYSINFO -DGIT_HOST_CPU="\"sparc64\""
-DUSE_LIBPCRE2 -DHAVE_ALLOCA_H  -DUSE_CURL_FOR_IMAP_SEND -DSUPPORTS_SIMPLE_IPC
-DSHA1_BLK -DSHA256_BLK  -DHAVE_PATHS_H -DHAVE_DEV_TTY -DHAVE_CLOCK_GETTIME
-DHAVE_CLOCK_MONOTONIC -DHAVE_SYNC_FILE_RANGE -DHAVE_GETDELIM
'-DPROCFS_EXECUTABLE_PATH="/proc/self/exe"' -DFREAD_READS_DIRECTORIES
-DNO_STRLCPY -DSHELL_PATH='"/bin/sh"'  builtin/merge-tree.c
during RTL pass: expand
builtin/merge-tree.c: In function ‘threeway_callback’:
builtin/merge-tree.c:327:12: internal compiler error: in do_store_flag, at
expr.cc:13547
  327 | static int threeway_callback(int n UNUSED, unsigned long mask,
      |            ^~~~~~~~~~~~~~~~~
rm -f xdiff/lib.a && sparc64-unknown-linux-gnu-ar rcs xdiff/lib.a
xdiff/xdiffi.o xdiff/xemit.o xdiff/xhistogram.o xdiff/xmerge.o
xdiff/xpatience.o xdiff/xprepare.o xdiff/xutils.o
0x1000072aa17 do_store_flag
        /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/expr.cc:13547
0x1000072b103 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/expr.cc:10684
0x1000073c15f expand_expr_real_gassign(gassign*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/expr.cc:11096
0x10000736923 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/expr.cc:11277
0x100009093af expand_normal(tree_node*)
        /usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/expr.h:322
0x100009093af expand_vec_cond_optab_fn
       
/usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/internal-fn.cc:3081
0x1000091dae3 expand_internal_call(internal_fn, gcall*)
       
/usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/internal-fn.cc:4913
0x1000091dae3 expand_internal_call(gcall*)
       
/usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/internal-fn.cc:4921
0x1000054ae5b expand_call_stmt
       
/usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/cfgexpand.cc:2771
0x1000054ae5b expand_gimple_stmt_1
       
/usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/cfgexpand.cc:3932
0x1000054ae5b expand_gimple_stmt
       
/usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/cfgexpand.cc:4077
0x10000554c5f expand_gimple_basic_block
       
/usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/cfgexpand.cc:6133
0x100005578df execute
       
/usr/src/debug/sys-devel/gcc-14.0.9999/gcc-14.0.9999/gcc/cfgexpand.cc:6872
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.
```

```
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/sparc64-unknown-linux-gnu/14/lto-wrapper
Target: sparc64-unknown-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-14.0.9999/work/gcc-14.0.9999/configure
--host=sparc64-unknown-linux-gnu --build=sparc64-unknown-linux-gnu
--prefix=/usr --bindir=/usr/sparc64-unknown-linux-gnu/gcc-bin/14
--includedir=/usr/lib/gcc/sparc64-unknown-linux-gnu/14/include
--datadir=/usr/share/gcc-data/sparc64-unknown-linux-gnu/14
--mandir=/usr/share/gcc-data/sparc64-unknown-linux-gnu/14/man
--infodir=/usr/share/gcc-data/sparc64-unknown-linux-gnu/14/info
--with-gxx-include-dir=/usr/lib/gcc/sparc64-unknown-linux-gnu/14/include/g++-v14
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/sparc64-unknown-linux-gnu/14/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=yes,extra,rtl
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 14.0.9999 p,
commit e54a7fbca63053b5753fd9ba543c27ef392d3084' --with-gcc-major-version-only
--enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--disable-multilib --disable-fixed-point --enable-targets=all --enable-libgomp
--disable-libssp --disable-libada --disable-cet --disable-systemtap
--disable-valgrind-annotations --disable-vtable-verify --disable-libvtv
--without-zstd --without-isl --enable-default-pie --enable-host-pie
--disable-host-bind-now --enable-default-ssp --disable-fixincludes
--with-build-config=bootstrap-O3
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 14.0.1 20240223 (experimental)
77de8b722db811e0d95af503552cd2acad8deaad (Gentoo 14.0.9999 p, commit
e54a7fbca63053b5753fd9ba543c27ef392d3084)
```

I can reproduce with just 'gcc -c merge-tree.i -O2 -mcpu=niagara4
-fno-vect-cost-model'.

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

* [Bug rtl-optimization/114070] [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model
  2024-02-23  7:28 [Bug rtl-optimization/114070] New: [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model sjames at gcc dot gnu.org
@ 2024-02-23  7:29 ` sjames at gcc dot gnu.org
  2024-02-23  7:36 ` [Bug middle-end/114070] " rguenth at gcc dot gnu.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-02-23  7:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Sam James <sjames at gcc dot gnu.org> ---
I'll reduce.

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

* [Bug middle-end/114070] [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model
  2024-02-23  7:28 [Bug rtl-optimization/114070] New: [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model sjames at gcc dot gnu.org
  2024-02-23  7:29 ` [Bug rtl-optimization/114070] " sjames at gcc dot gnu.org
@ 2024-02-23  7:36 ` rguenth at gcc dot gnu.org
  2024-02-23 11:56 ` rguenth at gcc dot gnu.org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-02-23  7:36 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org
             Target|                            |sparc
   Target Milestone|---                         |12.4

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
  /* For vector typed comparisons emit code to generate the desired
     all-ones or all-zeros mask.  */
  if (VECTOR_TYPE_P (ops->type))
    {
      tree ifexp = build2 (ops->code, ops->type, arg0, arg1);
      if (VECTOR_BOOLEAN_TYPE_P (ops->type)
          && expand_vec_cmp_expr_p (TREE_TYPE (arg0), ops->type, ops->code))
        return expand_vec_cmp_expr (ops->type, ifexp, target);
      else
        gcc_unreachable ();

that means we end up with a non-boolean vector "flag".  Possibly a middle-end
issue indeed.

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

* [Bug middle-end/114070] [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model
  2024-02-23  7:28 [Bug rtl-optimization/114070] New: [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model sjames at gcc dot gnu.org
  2024-02-23  7:29 ` [Bug rtl-optimization/114070] " sjames at gcc dot gnu.org
  2024-02-23  7:36 ` [Bug middle-end/114070] " rguenth at gcc dot gnu.org
@ 2024-02-23 11:56 ` rguenth at gcc dot gnu.org
  2024-02-23 12:16 ` sjames at gcc dot gnu.org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-02-23 11:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2024-02-23
     Ever confirmed|0                           |1
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Btw, I can't reproduce with a cross configured like

../configure --target=sparc64-unknown-linux-gnu --enable-languages=c

also not when adding -fPIE.  Is there any other magic happening?  What's
the cc1 command-line?

Hmm, looks like there are assembler tests that disable CPU support features...

#define HAVE_AS_FMAF_HPC_VIS3

looks needed, then it reproduces.

We are expanding

_28 = .VCOND (vect__165.122_219, { 16384, 16384 }, { -1, -1 }, _112, 114);

and when expanding _112 we have

 <ssa_name 0x7ffff5e07bd0
    type <vector_type 0x7ffff5cdc9d8
        type <boolean_type 0x7ffff5c91930 public SI
            size <integer_cst 0x7ffff6a20060 constant 32>
            unit-size <integer_cst 0x7ffff6a20078 constant 4>
            align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff5c91930 precision:32 min <integer_cst 0x7ffff5d71210 -2147483648> max
<integer_cst 0x7ffff5d71258 2147483647>>
        V2SI
        size <integer_cst 0x7ffff6a0be10 constant 64>
        unit-size <integer_cst 0x7ffff6a0be28 constant 8>
        align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff5cdc9d8 nunits:2>
    visited
    def_stmt _112 = vect_cst__33 == { 0, 0 };
    version:112>

so the issue is that we can't expand vect_cst__33 == { 0, 0 } and
this goes downhill after some match.pd stuff putting up VEC_CONDs for
masks.

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

* [Bug middle-end/114070] [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model
  2024-02-23  7:28 [Bug rtl-optimization/114070] New: [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model sjames at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-02-23 11:56 ` rguenth at gcc dot gnu.org
@ 2024-02-23 12:16 ` sjames at gcc dot gnu.org
  2024-02-23 12:46 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-02-23 12:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Sam James <sjames at gcc dot gnu.org> ---
reduced:
```
struct name_entry {
  int mode;
} traverse_trees(), *unresolved_n;

void unresolved(int i, unsigned dirmask, unsigned mask) {
  for (; i; i++) {
    mask |= 1;
    if (!unresolved_n[i].mode || unresolved_n[i].mode & 70000)
      dirmask |= i;
  }
  if (dirmask == mask)
    traverse_trees();
}
```

and yeah, sorry Richard - I can't reproduce via cross either on my build. I
wasn't aware of that configure test..

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

* [Bug middle-end/114070] [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model
  2024-02-23  7:28 [Bug rtl-optimization/114070] New: [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model sjames at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-02-23 12:16 ` sjames at gcc dot gnu.org
@ 2024-02-23 12:46 ` rguenth at gcc dot gnu.org
  2024-02-23 13:11 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-02-23 12:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
Further reduced:

int unresolved(unsigned dirmask, unsigned mask, int *unresolved_n)
{
  for (int i = 0; i < 1024; i++) {
    mask |= 1;
    if (!unresolved_n[i] || unresolved_n[i] & 70000)
      dirmask |= 1;
  }
  return (dirmask == mask);
}

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

* [Bug middle-end/114070] [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model
  2024-02-23  7:28 [Bug rtl-optimization/114070] New: [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model sjames at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-02-23 12:46 ` rguenth at gcc dot gnu.org
@ 2024-02-23 13:11 ` rguenth at gcc dot gnu.org
  2024-02-23 15:15 ` [Bug middle-end/114070] [12/13/14 " rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-02-23 13:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
So we vectorize this to

  _97 = vect__4.15_91 == { 0, 0 };
  vect_patt_8.17_98 = VEC_COND_EXPR <_97, { 1, 1 }, { 0, 0 }>;
  _102 = vect__5.16_93 != { 0, 0 };
  vect_patt_19.18_103 = VEC_COND_EXPR <_102, { 1, 1 }, { 0, 0 }>;
  vect_patt_10.19_104 = vect_patt_8.17_98 | vect_patt_19.18_103;
  _108 = vect_patt_10.19_104 != { 0, 0 };
  vect_patt_7.20_109 = VEC_COND_EXPR <_108, { 1, 1 }, { 0, 0 }>;

where the _108/_109 defs are really redundant.  VRP2 is then the first
pass folding every stmt I think and it transforms this to

  _97 = vect__4.15_91 == { 0, 0 };
  _102 = vect__5.16_93 != { 0, 0 };
  _108 = VEC_COND_EXPR <_97, { -1, -1 }, _102>;
  vect_patt_7.20_109 = VEC_COND_EXPR <_108, { 1, 1 }, { 0, 0 }>;

I think this is matching

 (simplify
  (op (vec_cond:s @0 @1 @2) @3)
  (vec_cond @0 (op! @1 @3) (op! @2 @3)))

but since this changes the type of the vec_cond it has to verify it's
still supported.

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

* [Bug middle-end/114070] [12/13/14 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model
  2024-02-23  7:28 [Bug rtl-optimization/114070] New: [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model sjames at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2024-02-23 13:11 ` rguenth at gcc dot gnu.org
@ 2024-02-23 15:15 ` rguenth at gcc dot gnu.org
  2024-02-26  7:43 ` cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-02-23 15:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 57512
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57512&action=edit
patch I am testing

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

* [Bug middle-end/114070] [12/13/14 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model
  2024-02-23  7:28 [Bug rtl-optimization/114070] New: [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model sjames at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2024-02-23 15:15 ` [Bug middle-end/114070] [12/13/14 " rguenth at gcc dot gnu.org
@ 2024-02-26  7:43 ` cvs-commit at gcc dot gnu.org
  2024-02-26  7:44 ` [Bug middle-end/114070] [12/13 " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-26  7:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- 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:af66ad89e8169f44db723813662917cf4cbb78fc

commit r14-9173-gaf66ad89e8169f44db723813662917cf4cbb78fc
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Feb 23 16:06:05 2024 +0100

    middle-end/114070 - folding breaking VEC_COND expansion

    The following properly guards the simplifications that move
    operations into VEC_CONDs, in particular when that changes the
    type constraints on this operation.

    This needed a genmatch fix which was recording spurious implicit fors
    when tcc_comparison is used in a C expression.

            PR middle-end/114070
            * genmatch.cc (parser::parse_c_expr): Do not record operand
            lists but only mark operators used.
            * match.pd ((c ? a : b) op (c ? d : e)  -->  c ? (a op d) : (b op
e)):
            Properly guard the case of tcc_comparison changing the VEC_COND
            value operand type.

            * gcc.dg/torture/pr114070.c: New testcase.

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

* [Bug middle-end/114070] [12/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model
  2024-02-23  7:28 [Bug rtl-optimization/114070] New: [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model sjames at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2024-02-26  7:43 ` cvs-commit at gcc dot gnu.org
@ 2024-02-26  7:44 ` rguenth at gcc dot gnu.org
  2024-03-01 12:10 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-02-26  7:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
            Summary|[12/13/14 regression] ICE   |[12/13 regression] ICE when
                   |when building git-2.43.2    |building git-2.43.2 with
                   |with -mcpu=niagara4         |-mcpu=niagara4
                   |-fno-vect-cost-model        |-fno-vect-cost-model
      Known to work|                            |14.0

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Should be fixed on trunk.

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

* [Bug middle-end/114070] [12/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model
  2024-02-23  7:28 [Bug rtl-optimization/114070] New: [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model sjames at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2024-02-26  7:44 ` [Bug middle-end/114070] [12/13 " rguenth at gcc dot gnu.org
@ 2024-03-01 12:10 ` cvs-commit at gcc dot gnu.org
  2024-03-21 11:49 ` cvs-commit at gcc dot gnu.org
  2024-03-21 11:49 ` cvs-commit at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-01 12:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 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:f9c30ea737b806caac917d8f501305151a2cbd57

commit r14-9252-gf9c30ea737b806caac917d8f501305151a2cbd57
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Feb 29 09:22:19 2024 +0100

    middle-end/114070 - VEC_COND_EXPR folding

    The following amends the PR114070 fix to optimistically allow
    the folding when we cannot expand the current vec_cond using
    vcond_mask and we're still before vector lowering.  This leaves
    a small window between vectorization and lowering where we could
    break vec_conds that can be expanded via vcond{,u,eq}, most
    susceptible is the loop unrolling pass which applies VN and thus
    possibly folding to the unrolled body of a vectorized loop.

    This gets back the folding for targets that cannot do vectorization.
    It doesn't get back the folding for x86 with AVX512 for example
    since that can handle the original IL but not the folded since
    it misses some vcond_mask expanders.

            PR middle-end/114070
            * match.pd ((c ? a : b) op d  -->  c ? (a op d) : (b op d)):
            Allow the folding if before lowering and the current IL
            isn't supported with vcond_mask.

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

* [Bug middle-end/114070] [12/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model
  2024-02-23  7:28 [Bug rtl-optimization/114070] New: [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model sjames at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2024-03-01 12:10 ` cvs-commit at gcc dot gnu.org
@ 2024-03-21 11:49 ` cvs-commit at gcc dot gnu.org
  2024-03-21 11:49 ` cvs-commit at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-21 11:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

commit r13-8480-ga9a425df628ab80374cc6a132d39e470bc78c8bc
Author: Richard Biener <rguenther@suse.de>
Date:   Fri Feb 23 16:06:05 2024 +0100

    middle-end/114070 - folding breaking VEC_COND expansion

    The following properly guards the simplifications that move
    operations into VEC_CONDs, in particular when that changes the
    type constraints on this operation.

    This needed a genmatch fix which was recording spurious implicit fors
    when tcc_comparison is used in a C expression.

            PR middle-end/114070
            * genmatch.cc (parser::parse_c_expr): Do not record operand
            lists but only mark operators used.
            * match.pd ((c ? a : b) op (c ? d : e)  -->  c ? (a op d) : (b op
e)):
            Properly guard the case of tcc_comparison changing the VEC_COND
            value operand type.

            * gcc.dg/torture/pr114070.c: New testcase.

    (cherry picked from commit af66ad89e8169f44db723813662917cf4cbb78fc)

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

* [Bug middle-end/114070] [12/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model
  2024-02-23  7:28 [Bug rtl-optimization/114070] New: [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model sjames at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2024-03-21 11:49 ` cvs-commit at gcc dot gnu.org
@ 2024-03-21 11:49 ` cvs-commit at gcc dot gnu.org
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-03-21 11:49 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

commit r13-8481-ga3ff14ac4804be400a52dcf630f0de2d57cae835
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Feb 29 09:22:19 2024 +0100

    middle-end/114070 - VEC_COND_EXPR folding

    The following amends the PR114070 fix to optimistically allow
    the folding when we cannot expand the current vec_cond using
    vcond_mask and we're still before vector lowering.  This leaves
    a small window between vectorization and lowering where we could
    break vec_conds that can be expanded via vcond{,u,eq}, most
    susceptible is the loop unrolling pass which applies VN and thus
    possibly folding to the unrolled body of a vectorized loop.

    This gets back the folding for targets that cannot do vectorization.
    It doesn't get back the folding for x86 with AVX512 for example
    since that can handle the original IL but not the folded since
    it misses some vcond_mask expanders.

            PR middle-end/114070
            * match.pd ((c ? a : b) op d  -->  c ? (a op d) : (b op d)):
            Allow the folding if before lowering and the current IL
            isn't supported with vcond_mask.

    (cherry picked from commit f9c30ea737b806caac917d8f501305151a2cbd57)

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

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

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-23  7:28 [Bug rtl-optimization/114070] New: [12/13/13 regression] ICE when building git-2.43.2 with -mcpu=niagara4 -fno-vect-cost-model sjames at gcc dot gnu.org
2024-02-23  7:29 ` [Bug rtl-optimization/114070] " sjames at gcc dot gnu.org
2024-02-23  7:36 ` [Bug middle-end/114070] " rguenth at gcc dot gnu.org
2024-02-23 11:56 ` rguenth at gcc dot gnu.org
2024-02-23 12:16 ` sjames at gcc dot gnu.org
2024-02-23 12:46 ` rguenth at gcc dot gnu.org
2024-02-23 13:11 ` rguenth at gcc dot gnu.org
2024-02-23 15:15 ` [Bug middle-end/114070] [12/13/14 " rguenth at gcc dot gnu.org
2024-02-26  7:43 ` cvs-commit at gcc dot gnu.org
2024-02-26  7:44 ` [Bug middle-end/114070] [12/13 " rguenth at gcc dot gnu.org
2024-03-01 12:10 ` cvs-commit at gcc dot gnu.org
2024-03-21 11:49 ` cvs-commit at gcc dot gnu.org
2024-03-21 11:49 ` cvs-commit 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).