[Bug tree-optimization/122762] [16 Regression] various SPECCPU 2017 benchmark ICEs with in prepare_vec_mask, at tree-vect-stmts.cc:1622

2025-11-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122762

Richard Biener  changed:

   What|Removed |Added

 CC||rsandifo at gcc dot gnu.org

--- Comment #7 from Richard Biener  ---
So we consider

 
unit-size 
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fefefd7c498 precision:4 min  max >
VNx4BI
size 
unit-size 
align:128 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fefefe1c0a8 precision:128 min  max
>
constant
elt0:  elt1: >

and 

 
unit-size 
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fefefd7c498 precision:4 min  max >
VNx4BI
size 
unit-size 
align:128 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7fefefe1c0a8 precision:128 min  max
>
constant
elt0:  elt1: >

not compatible, because aarch64_compatible_vector_types_p they are not.

Not sure why this does not reproduce reliably.

So the issue is then likely that the

  bestn->simdclone->args[i].vector_type

is (sometimes?) a SVE builtin type and when we register that with the loop
mask things go downhill?

I do wonder why the middle-end should care about SVE builtin type vs. not.
We need to insert conversions there then?  And why the SVE builtin type
(identified by a type attribute) isn't a variant type of the non-builtin
one.

[Bug tree-optimization/122762] [16 Regression] various SPECCPU 2017 benchmark ICEs with in prepare_vec_mask, at tree-vect-stmts.cc:1622

2025-11-20 Thread schwab--- via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122762

--- Comment #6 from Andreas Schwab  ---
gdb disables ASLR by default which may hide the issue.  Try set
disable-randomization off.

[Bug tree-optimization/122762] [16 Regression] various SPECCPU 2017 benchmark ICEs with in prepare_vec_mask, at tree-vect-stmts.cc:1622

2025-11-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122762

--- Comment #5 from Richard Biener  ---
(In reply to Richard Biener from comment #4)
> (In reply to Sam James from comment #2)
> > I see it in the testsuite too:
> > 
> >  FAIL: gcc.dg/vect/vect-early-break_39.c scan-tree-dump-times vect
> > "vectorized 1 loops in function" 0
> > +FAIL: gcc.dg/vect/vect-fncall-mask-math.c (internal compiler error: in
> > prepare_vec_mask, at tree-vect-stmts.cc:1622)
> > +FAIL: gcc.dg/vect/vect-fncall-mask-math.c (test for excess errors)
> >  XPASS: gcc.dg/vect/vect-fncall-mask-math.c -flto -ffat-lto-objects 
> > scan-tree-dump-not ifcvt " gimple_call "
> > +FAIL: gcc.dg/vect/vect-fncall-mask-math.c -flto -ffat-lto-objects (internal
> > compiler error: in prepare_vec_mask, at tree-vect-stmts.cc:1622)
> > +FAIL: gcc.dg/vect/vect-fncall-mask-math.c -flto -ffat-lto-objects (test for
> > excess errors)
> >  XPASS: gcc.dg/vect/vect-fncall-mask-math.c scan-tree-dump-not ifcvt "
> > gimple_call "
> > +FAIL: gcc.dg/vect/vect-fncall-mask.c (internal compiler error: in
> > prepare_vec_mask, at tree-vect-stmts.cc:1622)
> > +FAIL: gcc.dg/vect/vect-fncall-mask.c (test for excess errors)
> > +FAIL: gcc.dg/vect/vect-fncall-mask.c -flto -ffat-lto-objects (internal
> > compiler error: in prepare_vec_mask, at tree-vect-stmts.cc:1622)
> > +FAIL: gcc.dg/vect/vect-fncall-mask.c -flto -ffat-lto-objects (test for
> > excess errors)
> 
> Reverting r16-5374-g5c2fdfc24e343c fixes this, I'll have a look.

Huh, so it ICEs most of the time, but never from within gdb.  valgrind is
clean.

[Bug tree-optimization/122762] [16 Regression] various SPECCPU 2017 benchmark ICEs with in prepare_vec_mask, at tree-vect-stmts.cc:1622

2025-11-20 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122762

Richard Biener  changed:

   What|Removed |Added

   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org
 Ever confirmed|0   |1
   Last reconfirmed||2025-11-20
 Status|UNCONFIRMED |ASSIGNED

--- Comment #4 from Richard Biener  ---
(In reply to Sam James from comment #2)
> I see it in the testsuite too:
> 
>  FAIL: gcc.dg/vect/vect-early-break_39.c scan-tree-dump-times vect
> "vectorized 1 loops in function" 0
> +FAIL: gcc.dg/vect/vect-fncall-mask-math.c (internal compiler error: in
> prepare_vec_mask, at tree-vect-stmts.cc:1622)
> +FAIL: gcc.dg/vect/vect-fncall-mask-math.c (test for excess errors)
>  XPASS: gcc.dg/vect/vect-fncall-mask-math.c -flto -ffat-lto-objects 
> scan-tree-dump-not ifcvt " gimple_call "
> +FAIL: gcc.dg/vect/vect-fncall-mask-math.c -flto -ffat-lto-objects (internal
> compiler error: in prepare_vec_mask, at tree-vect-stmts.cc:1622)
> +FAIL: gcc.dg/vect/vect-fncall-mask-math.c -flto -ffat-lto-objects (test for
> excess errors)
>  XPASS: gcc.dg/vect/vect-fncall-mask-math.c scan-tree-dump-not ifcvt "
> gimple_call "
> +FAIL: gcc.dg/vect/vect-fncall-mask.c (internal compiler error: in
> prepare_vec_mask, at tree-vect-stmts.cc:1622)
> +FAIL: gcc.dg/vect/vect-fncall-mask.c (test for excess errors)
> +FAIL: gcc.dg/vect/vect-fncall-mask.c -flto -ffat-lto-objects (internal
> compiler error: in prepare_vec_mask, at tree-vect-stmts.cc:1622)
> +FAIL: gcc.dg/vect/vect-fncall-mask.c -flto -ffat-lto-objects (test for
> excess errors)

Reverting r16-5374-g5c2fdfc24e343c fixes this, I'll have a look.

[Bug tree-optimization/122762] [16 Regression] various SPECCPU 2017 benchmark ICEs with in prepare_vec_mask, at tree-vect-stmts.cc:1622

2025-11-19 Thread tnfchris at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122762

--- Comment #3 from Tamar Christina  ---
My reducer finished,

int b;
double k, f;
__attribute__((__simd__)) double pow(double, double);
long a;
double c;
void d() {
  for (; a < b; a++)
if (a)
  c = pow(f, k);
}

compiled with -march=armv8-a+sve -Ofast

However I can't reproduce it on latest master.. let me try bisecting.

[Bug tree-optimization/122762] [16 Regression] various SPECCPU 2017 benchmark ICEs with in prepare_vec_mask, at tree-vect-stmts.cc:1622

2025-11-19 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122762

Sam James  changed:

   What|Removed |Added

   Keywords||testsuite-fail

--- Comment #2 from Sam James  ---
I see it in the testsuite too:

 FAIL: gcc.dg/vect/vect-early-break_39.c scan-tree-dump-times vect "vectorized
1 loops in function" 0
+FAIL: gcc.dg/vect/vect-fncall-mask-math.c (internal compiler error: in
prepare_vec_mask, at tree-vect-stmts.cc:1622)
+FAIL: gcc.dg/vect/vect-fncall-mask-math.c (test for excess errors)
 XPASS: gcc.dg/vect/vect-fncall-mask-math.c -flto -ffat-lto-objects 
scan-tree-dump-not ifcvt " gimple_call "
+FAIL: gcc.dg/vect/vect-fncall-mask-math.c -flto -ffat-lto-objects (internal
compiler error: in prepare_vec_mask, at tree-vect-stmts.cc:1622)
+FAIL: gcc.dg/vect/vect-fncall-mask-math.c -flto -ffat-lto-objects (test for
excess errors)
 XPASS: gcc.dg/vect/vect-fncall-mask-math.c scan-tree-dump-not ifcvt "
gimple_call "
+FAIL: gcc.dg/vect/vect-fncall-mask.c (internal compiler error: in
prepare_vec_mask, at tree-vect-stmts.cc:1622)
+FAIL: gcc.dg/vect/vect-fncall-mask.c (test for excess errors)
+FAIL: gcc.dg/vect/vect-fncall-mask.c -flto -ffat-lto-objects (internal
compiler error: in prepare_vec_mask, at tree-vect-stmts.cc:1622)
+FAIL: gcc.dg/vect/vect-fncall-mask.c -flto -ffat-lto-objects (test for excess
errors)

[Bug tree-optimization/122762] [16 Regression] various SPECCPU 2017 benchmark ICEs with in prepare_vec_mask, at tree-vect-stmts.cc:1622

2025-11-19 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122762

Richard Biener  changed:

   What|Removed |Added

   Keywords||needs-bisection
 CC||rguenth at gcc dot gnu.org

--- Comment #1 from Richard Biener  ---
PR122736 you mean?  r16-5374-g5c2fdfc24e343c?  Should not affect this place
though.

[Bug tree-optimization/122762] [16 Regression] various SPECCPU 2017 benchmark ICEs with in prepare_vec_mask, at tree-vect-stmts.cc:1622

2025-11-19 Thread sjames at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122762

Sam James  changed:

   What|Removed |Added

   Keywords||needs-source
   Target Milestone|--- |16.0