* [Bug target/101505] [10/11/12 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0)
2021-07-19 7:35 [Bug target/101505] New: [10/11/12 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0) asolokha at gmx dot com
@ 2021-07-19 7:45 ` rguenth at gcc dot gnu.org
2021-07-19 11:26 ` rguenth at gcc dot gnu.org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-19 7:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101505
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2021-07-19
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I will have a look.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/101505] [10/11/12 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0)
2021-07-19 7:35 [Bug target/101505] New: [10/11/12 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0) asolokha at gmx dot com
2021-07-19 7:45 ` [Bug target/101505] " rguenth at gcc dot gnu.org
@ 2021-07-19 11:26 ` rguenth at gcc dot gnu.org
2021-07-19 11:26 ` rguenth at gcc dot gnu.org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-19 11:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101505
--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
vectorizable_lc_phi get's the vectorized stmts of _4 = xb_17 <= 0; but sees
the mask rather than the pattern stmt used to produce the desired result.
The def_stmt is vect_used_in_outer, and otherwise the use stmt is "dead".
We also failed to mark the pattern.
That said, the failure looks like it is in bool pattern recog which fails
to see the use of _4 = xb_17 <= 0 in non-bool context here.
<bb 4> [local count: 715863673]:
# xb_17 = PHI <xb_5(8), xb_2(3)>
# qp_19 = PHI <qp_7(8), 0(3)>
# ivtmp_15 = PHI <ivtmp_6(8), 2(3)>
_4 = xb_17 <= 0;
xb_5 = (short int) _4;
qp_7 = qp_19 + 1;
ivtmp_6 = ivtmp_15 - 1;
if (ivtmp_6 != 0)
goto <bb 8>; [66.67%]
else
goto <bb 5>; [33.33%]
<bb 5> [local count: 357878152]:
# _18 = PHI <_4(4)>
_8 = (char) _18;
retval.2[iter.3_10] = _8;
iter.3_11 = iter.3_10 + 1;
ivtmp_16 = ivtmp_3 - 1;
if (ivtmp_16 != 0)
goto <bb 7>; [100.00%]
else
goto <bb 6>; [0.00%]
I've fixed this once for BB vect but not loop vect (I guess due to lack of a
testcase).
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/101505] [10/11/12 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0)
2021-07-19 7:35 [Bug target/101505] New: [10/11/12 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0) asolokha at gmx dot com
2021-07-19 7:45 ` [Bug target/101505] " rguenth at gcc dot gnu.org
2021-07-19 11:26 ` rguenth at gcc dot gnu.org
@ 2021-07-19 11:26 ` rguenth at gcc dot gnu.org
2021-07-19 12:21 ` cvs-commit at gcc dot gnu.org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-19 11:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101505
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Target Milestone|--- |10.4
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/101505] [10/11/12 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0)
2021-07-19 7:35 [Bug target/101505] New: [10/11/12 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0) asolokha at gmx dot com
` (2 preceding siblings ...)
2021-07-19 11:26 ` rguenth at gcc dot gnu.org
@ 2021-07-19 12:21 ` cvs-commit at gcc dot gnu.org
2021-07-19 12:22 ` [Bug target/101505] [10/11 " rguenth at gcc dot gnu.org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-19 12:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101505
--- Comment #3 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:8df3ee8f7d85d0708f3c3ca96b55c9230c2ae9f0
commit r12-2393-g8df3ee8f7d85d0708f3c3ca96b55c9230c2ae9f0
Author: Richard Biener <rguenther@suse.de>
Date: Mon Jul 19 13:29:16 2021 +0200
tree-optimization/101505 - properly determine stmt precision for PHIs
Loop vectorization pattern recog fails to walk PHIs when determining
stmt precisions. This fails to recognize non-mask uses for bools
in PHIs and outer loop vectorization.
2021-07-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/101505
* tree-vect-patterns.c (vect_determine_precisions): Walk
PHIs also for loop vectorization.
* gcc.dg/vect/pr101505.c: New testcase.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/101505] [10/11 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0)
2021-07-19 7:35 [Bug target/101505] New: [10/11/12 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0) asolokha at gmx dot com
` (3 preceding siblings ...)
2021-07-19 12:21 ` cvs-commit at gcc dot gnu.org
@ 2021-07-19 12:22 ` rguenth at gcc dot gnu.org
2021-08-04 20:49 ` dcb314 at hotmail dot com
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-19 12:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101505
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |12.0
Summary|[10/11/12 Regression] ICE: |[10/11 Regression] ICE:
|verify_gimple failed |verify_gimple failed
|(error: incompatible types |(error: incompatible types
|in 'PHI' argument 0) |in 'PHI' argument 0)
--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk sofar.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/101505] [10/11 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0)
2021-07-19 7:35 [Bug target/101505] New: [10/11/12 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0) asolokha at gmx dot com
` (4 preceding siblings ...)
2021-07-19 12:22 ` [Bug target/101505] [10/11 " rguenth at gcc dot gnu.org
@ 2021-08-04 20:49 ` dcb314 at hotmail dot com
2021-08-04 21:13 ` dcb314 at hotmail dot com
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: dcb314 at hotmail dot com @ 2021-08-04 20:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101505
David Binderman <dcb314 at hotmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dcb314 at hotmail dot com
--- Comment #5 from David Binderman <dcb314 at hotmail dot com> ---
Certainly works for -O3, but doesn't for -O3 -march=bdver2.
during RTL pass: expand
./gcc.dg/vect/pr101505.c: In function ‘w7.simdclone.6’:
./gcc.dg/vect/pr101505.c:15:10: internal compiler error: in expand_mult, at
expm
ed.c:3585
15 | return xb;
| ^~
0x91344a expand_mult(machine_mode, rtx_def*, rtx_def*, rtx_def*, int, bool)
../../trunk.git/gcc/expmed.c:3585
It breaks sometime between git hash 145bc41dae7c7bfa and 14d8a5ae472ca574
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/101505] [10/11 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0)
2021-07-19 7:35 [Bug target/101505] New: [10/11/12 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0) asolokha at gmx dot com
` (5 preceding siblings ...)
2021-08-04 20:49 ` dcb314 at hotmail dot com
@ 2021-08-04 21:13 ` dcb314 at hotmail dot com
2021-08-05 8:16 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: dcb314 at hotmail dot com @ 2021-08-04 21:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101505
--- Comment #6 from David Binderman <dcb314 at hotmail dot com> ---
Further research suggests it also crashes with amdfam10, athlon-fx,
athlon64, athlon64-sse3, barcelona, bdver1, bdver3, bdver4, btver1,
btver2, eden-x2, eden-x4, k8, k8-sse3, nano, nano-1000, nano-2000,
nano-3000, nano-x2, nano-x4, opteron, opteron-sse3.
23 in total.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/101505] [10/11 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0)
2021-07-19 7:35 [Bug target/101505] New: [10/11/12 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0) asolokha at gmx dot com
` (6 preceding siblings ...)
2021-08-04 21:13 ` dcb314 at hotmail dot com
@ 2021-08-05 8:16 ` rguenth at gcc dot gnu.org
2021-08-05 18:31 ` dcb314 at hotmail dot com
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-08-05 8:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101505
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to David Binderman from comment #5)
> Certainly works for -O3, but doesn't for -O3 -march=bdver2.
>
> during RTL pass: expand
> ./gcc.dg/vect/pr101505.c: In function ‘w7.simdclone.6’:
> ./gcc.dg/vect/pr101505.c:15:10: internal compiler error: in expand_mult, at
> expm
> ed.c:3585
> 15 | return xb;
> | ^~
> 0x91344a expand_mult(machine_mode, rtx_def*, rtx_def*, rtx_def*, int, bool)
> ../../trunk.git/gcc/expmed.c:3585
>
> It breaks sometime between git hash 145bc41dae7c7bfa and 14d8a5ae472ca574
This is a different bug though, probably caused by HJs changes, looks like
the fixed PR101742, indeed updating and re-building my dev tree makes the
issue go away.
gcc.dg/vect/pr101505.c:15:10: internal compiler error: in expand_mult, at
expmed.c:3585
0xe14f0a expand_mult(machine_mode, rtx_def*, rtx_def*, rtx_def*, int, bool)
/home/rguenther/src/gcc2/gcc/expmed.c:3585
0xc3584d builtin_memset_gen_str
/home/rguenther/src/gcc2/gcc/builtins.c:4124
0xe25ee4 pieces_addr::adjust(fixed_size_mode, long, by_pieces_prev*)
/home/rguenther/src/gcc2/gcc/expr.c:1036
0xe268a8 op_by_pieces_d::run()
/home/rguenther/src/gcc2/gcc/expr.c:1252
0xe273ed store_by_pieces(rtx_def*, unsigned long, rtx_def* (*)(void*, void*,
long, fixed_size_mode), void*, unsigned int, bool, memop_ret)
/home/rguenther/src/gcc2/gcc/expr.c:1579
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/101505] [10/11 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0)
2021-07-19 7:35 [Bug target/101505] New: [10/11/12 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0) asolokha at gmx dot com
` (7 preceding siblings ...)
2021-08-05 8:16 ` rguenth at gcc dot gnu.org
@ 2021-08-05 18:31 ` dcb314 at hotmail dot com
2021-08-06 9:43 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: dcb314 at hotmail dot com @ 2021-08-05 18:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101505
--- Comment #8 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to Richard Biener from comment #7)
> This is a different bug though, probably caused by HJs changes, looks like
> the fixed PR101742, indeed updating and re-building my dev tree makes the
> issue go away.
Indeed it does. Today's gcc is fine. My apologies for my error.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/101505] [10/11 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0)
2021-07-19 7:35 [Bug target/101505] New: [10/11/12 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0) asolokha at gmx dot com
` (8 preceding siblings ...)
2021-08-05 18:31 ` dcb314 at hotmail dot com
@ 2021-08-06 9:43 ` cvs-commit at gcc dot gnu.org
2021-09-06 9:10 ` [Bug target/101505] [10 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-08-06 9:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101505
--- Comment #9 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:c891d268c446bd01f82e256e24580afcb3b526ae
commit r11-8831-gc891d268c446bd01f82e256e24580afcb3b526ae
Author: Richard Biener <rguenther@suse.de>
Date: Mon Jul 19 13:29:16 2021 +0200
tree-optimization/101505 - properly determine stmt precision for PHIs
Loop vectorization pattern recog fails to walk PHIs when determining
stmt precisions. This fails to recognize non-mask uses for bools
in PHIs and outer loop vectorization.
2021-07-19 Richard Biener <rguenther@suse.de>
PR tree-optimization/101505
* tree-vect-patterns.c (vect_determine_precisions): Walk
PHIs also for loop vectorization.
* gcc.dg/vect/pr101505.c: New testcase.
(cherry picked from commit 8df3ee8f7d85d0708f3c3ca96b55c9230c2ae9f0)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/101505] [10 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0)
2021-07-19 7:35 [Bug target/101505] New: [10/11/12 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0) asolokha at gmx dot com
` (9 preceding siblings ...)
2021-08-06 9:43 ` cvs-commit at gcc dot gnu.org
@ 2021-09-06 9:10 ` rguenth at gcc dot gnu.org
2022-06-28 10:45 ` jakub at gcc dot gnu.org
2023-07-07 9:44 ` rguenth at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-09-06 9:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101505
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on| |97706
--- Comment #10 from Richard Biener <rguenth at gcc dot gnu.org> ---
There's more changes/fixes to be backported to fix this on the GCC 10 branch,
like PR97706 and related fixes. Not sure if it is worth the trouble, the ICE
doesn't seem to reproduce for me on the branch but instead I get
t.c: In function 'w7.simdclone.0':
t.c:4:1: error: non-trivial conversion in 'ssa_name'
4 | w7 (void)
| ^~
vector(8) unsigned char
vector(8) <unnamed type>
vect__18.21_29 = mask__4.19_25;
t.c:4: confused by earlier errors, bailing out
which may be another issue that's latent there.
Referenced Bugs:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97706
[Bug 97706] [11 Regression] ICE with LTO at -O3: verify_gimple failed
(incompatible types in 'PHI' argument 0)
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/101505] [10 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0)
2021-07-19 7:35 [Bug target/101505] New: [10/11/12 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0) asolokha at gmx dot com
` (10 preceding siblings ...)
2021-09-06 9:10 ` [Bug target/101505] [10 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:45 ` jakub at gcc dot gnu.org
2023-07-07 9:44 ` rguenth at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101505
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.4 |10.5
--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug target/101505] [10 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0)
2021-07-19 7:35 [Bug target/101505] New: [10/11/12 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 0) asolokha at gmx dot com
` (11 preceding siblings ...)
2022-06-28 10:45 ` jakub at gcc dot gnu.org
@ 2023-07-07 9:44 ` rguenth at gcc dot gnu.org
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 9:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101505
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |10.5.0
Resolution|--- |FIXED
Target Milestone|10.5 |11.3
Status|ASSIGNED |RESOLVED
--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed for GCC 11.3.
^ permalink raw reply [flat|nested] 14+ messages in thread