public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/103311] New: [12 Regression] ICE in complex_mul_pattern::build(vec_info*)
@ 2021-11-18 10:42 asolokha at gmx dot com
2021-11-18 11:26 ` [Bug tree-optimization/103311] " rguenth at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: asolokha at gmx dot com @ 2021-11-18 10:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103311
Bug ID: 103311
Summary: [12 Regression] ICE in
complex_mul_pattern::build(vec_info*)
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
Target: aarch64-linux-gnu
gcc-12.0.0-alpha20111114 snapshot (g:3057f1ab737582a9fb37a3fb967ed8bf3659f2f4)
ICEs when compiling the following testcase w/ -march=armv8.3-a -O1
-ftree-slp-vectorize:
_Complex double y;
void
cbknu (_Complex double f)
{
const _Complex double cone = 1.0e0;
f = f * cone;
y = f * cone;
}
% aarch64-linux-gnu-gcc-12.0.0 -march=armv8.3-a -O1 -ftree-slp-vectorize -c
cbknu.c
during GIMPLE pass: slp
cbknu.c: In function 'cbknu':
cbknu.c:4:1: internal compiler error: in operator[], at vec.h:889
4 | cbknu (_Complex double f)
| ^~~~~
0x7e18be vec<tree_node*, va_heap, vl_embed>::operator[](unsigned int)
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/vec.h:889
0x7e1a73 vec<_slp_tree*, va_heap, vl_embed>::operator[](unsigned int)
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/tree-vect-slp-patterns.c:1119
0x7e1a73 vec<_slp_tree*, va_heap, vl_ptr>::operator[](unsigned int)
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/vec.h:1495
0x7e1a73 complex_mul_pattern::build(vec_info*)
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/tree-vect-slp-patterns.c:1083
0x11f8b00 vect_match_slp_patterns_2
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/tree-vect-slp.c:2915
0x11f8aa6 vect_match_slp_patterns_2
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/tree-vect-slp.c:2907
0x11f8aa6 vect_match_slp_patterns_2
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/tree-vect-slp.c:2907
0x11fce1e vect_match_slp_patterns
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/tree-vect-slp.c:2943
0x11fce1e vect_analyze_slp(vec_info*, unsigned int)
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/tree-vect-slp.c:3426
0x12030dc vect_slp_analyze_bb_1
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/tree-vect-slp.c:5744
0x12030dc vect_slp_region
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/tree-vect-slp.c:5846
0x1204b24 vect_slp_bbs
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/tree-vect-slp.c:6038
0x1204f68 vect_slp_function(function*)
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/tree-vect-slp.c:6126
0x120c28a execute
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-12.0.0_alpha20211114/work/gcc-12-20211114/gcc/tree-vectorizer.c:1459
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/103311] [12 Regression] ICE in complex_mul_pattern::build(vec_info*)
2021-11-18 10:42 [Bug tree-optimization/103311] New: [12 Regression] ICE in complex_mul_pattern::build(vec_info*) asolokha at gmx dot com
@ 2021-11-18 11:26 ` rguenth at gcc dot gnu.org
2021-11-18 11:42 ` [Bug tree-optimization/103311] [12 Regression] ICE in complex_mul_pattern::build(vec_info*) since r12-4785-ged3de62ac949c92ad41ef6de7cc926fbb2a510ce marxin at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-11-18 11:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103311
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tnfchris at gcc dot gnu.org
Target Milestone|--- |12.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/103311] [12 Regression] ICE in complex_mul_pattern::build(vec_info*) since r12-4785-ged3de62ac949c92ad41ef6de7cc926fbb2a510ce
2021-11-18 10:42 [Bug tree-optimization/103311] New: [12 Regression] ICE in complex_mul_pattern::build(vec_info*) asolokha at gmx dot com
2021-11-18 11:26 ` [Bug tree-optimization/103311] " rguenth at gcc dot gnu.org
@ 2021-11-18 11:42 ` marxin at gcc dot gnu.org
2021-11-18 11:46 ` tnfchris at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-18 11:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103311
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2021-11-18
Status|UNCONFIRMED |NEW
Summary|[12 Regression] ICE in |[12 Regression] ICE in
|complex_mul_pattern::build( |complex_mul_pattern::build(
|vec_info*) |vec_info*) since
| |r12-4785-ged3de62ac949c92ad
| |41ef6de7cc926fbb2a510ce
CC| |marxin at gcc dot gnu.org
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-4785-ged3de62ac949c92ad41ef6de7cc926fbb2a510ce.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/103311] [12 Regression] ICE in complex_mul_pattern::build(vec_info*) since r12-4785-ged3de62ac949c92ad41ef6de7cc926fbb2a510ce
2021-11-18 10:42 [Bug tree-optimization/103311] New: [12 Regression] ICE in complex_mul_pattern::build(vec_info*) asolokha at gmx dot com
2021-11-18 11:26 ` [Bug tree-optimization/103311] " rguenth at gcc dot gnu.org
2021-11-18 11:42 ` [Bug tree-optimization/103311] [12 Regression] ICE in complex_mul_pattern::build(vec_info*) since r12-4785-ged3de62ac949c92ad41ef6de7cc926fbb2a510ce marxin at gcc dot gnu.org
@ 2021-11-18 11:46 ` tnfchris at gcc dot gnu.org
2021-11-18 17:12 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2021-11-18 11:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103311
Tamar Christina <tnfchris at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |tnfchris at gcc dot gnu.org
--- Comment #2 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
Both sides of the VEC_PERM_EXPR need to be a multiply,
the check is currently
if (!mul0 && !mul1)
return IFN_LAST;
while it should be
if (!mul0 || !mul1)
return IFN_LAST;
testing a patch.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/103311] [12 Regression] ICE in complex_mul_pattern::build(vec_info*) since r12-4785-ged3de62ac949c92ad41ef6de7cc926fbb2a510ce
2021-11-18 10:42 [Bug tree-optimization/103311] New: [12 Regression] ICE in complex_mul_pattern::build(vec_info*) asolokha at gmx dot com
` (2 preceding siblings ...)
2021-11-18 11:46 ` tnfchris at gcc dot gnu.org
@ 2021-11-18 17:12 ` cvs-commit at gcc dot gnu.org
2021-11-18 17:21 ` tnfchris at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-18 17:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103311
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tamar Christina <tnfchris@gcc.gnu.org>:
https://gcc.gnu.org/g:4f0a2f5a3ddb1024b885c066a18caae4d733bb6c
commit r12-5378-g4f0a2f5a3ddb1024b885c066a18caae4d733bb6c
Author: Tamar Christina <tamar.christina@arm.com>
Date: Thu Nov 18 17:10:36 2021 +0000
middle-end: check that both sides of complex expression is a mul.
Both sides of the VEC_PERM_EXPR need to be a MULT but the check
was accidentally checking if both sides are a mul.
The FMS case would be handled by the validate_multiplication but
this makes the requirement more explicit and we exit earlier.
gcc/ChangeLog:
PR tree-optimization/103311
* tree-vect-slp-patterns.c (complex_mul_pattern::matches,
complex_fms_pattern::matches): Check for multiplications.
gcc/testsuite/ChangeLog:
PR tree-optimization/103311
* gcc.target/aarch64/pr103311.c: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/103311] [12 Regression] ICE in complex_mul_pattern::build(vec_info*) since r12-4785-ged3de62ac949c92ad41ef6de7cc926fbb2a510ce
2021-11-18 10:42 [Bug tree-optimization/103311] New: [12 Regression] ICE in complex_mul_pattern::build(vec_info*) asolokha at gmx dot com
` (3 preceding siblings ...)
2021-11-18 17:12 ` cvs-commit at gcc dot gnu.org
@ 2021-11-18 17:21 ` tnfchris at gcc dot gnu.org
2021-11-18 23:01 ` tnfchris at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2021-11-18 17:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103311
Tamar Christina <tnfchris at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
Fixed on trunk.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/103311] [12 Regression] ICE in complex_mul_pattern::build(vec_info*) since r12-4785-ged3de62ac949c92ad41ef6de7cc926fbb2a510ce
2021-11-18 10:42 [Bug tree-optimization/103311] New: [12 Regression] ICE in complex_mul_pattern::build(vec_info*) asolokha at gmx dot com
` (4 preceding siblings ...)
2021-11-18 17:21 ` tnfchris at gcc dot gnu.org
@ 2021-11-18 23:01 ` tnfchris at gcc dot gnu.org
2021-11-19 15:13 ` cvs-commit at gcc dot gnu.org
2021-11-19 15:14 ` tnfchris at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2021-11-18 23:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103311
Tamar Christina <tnfchris at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|FIXED |---
Status|RESOLVED |REOPENED
--- Comment #5 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
MLA ended up getting not detected, for some reason the testcases where getting
skipped.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/103311] [12 Regression] ICE in complex_mul_pattern::build(vec_info*) since r12-4785-ged3de62ac949c92ad41ef6de7cc926fbb2a510ce
2021-11-18 10:42 [Bug tree-optimization/103311] New: [12 Regression] ICE in complex_mul_pattern::build(vec_info*) asolokha at gmx dot com
` (5 preceding siblings ...)
2021-11-18 23:01 ` tnfchris at gcc dot gnu.org
@ 2021-11-19 15:13 ` cvs-commit at gcc dot gnu.org
2021-11-19 15:14 ` tnfchris at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-19 15:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103311
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tamar Christina <tnfchris@gcc.gnu.org>:
https://gcc.gnu.org/g:487d604b6fa0f0a981eadc216d9e481d08ed7e7b
commit r12-5407-g487d604b6fa0f0a981eadc216d9e481d08ed7e7b
Author: Tamar Christina <tamar.christina@arm.com>
Date: Fri Nov 19 15:12:38 2021 +0000
middle-end: Handle FMA_CONJ correctly after SLP layout update.
Apologies, I got dinged by the i386 regressions bot for a test I didn't
have in
my tree at the time I made the previous patch. The bot was telling me that
FMA
stopped working after I strengthened the FMA check in the previous patch.
The reason is that the check is slightly early. The first check can indeed
only
exit early when either node isn't a mult. However we need to delay till we
know
if the node is a MUL or FMA before enforcing that both nodes must be a MULT
since the node to inspect is different if the operation is a MUL or FMA.
Also with the update patch for GCC 11 tree layout update to the new GCC 12
one
I had missed that the difference in which node is conjucated is not
symmetrical.
So the test for it can just be testing the inverse order. It was Currently
no detecting when the first node was conjucated instead of the second one.
This also made me wonder why my own test didn't detect this. It turns out
that
the tests, being copied from the _Float16 ones were incorrectly marked as
xfail. The _Float16 ones are marked as xfail since C doesn't have a conj
operation for _Float16, which means you get extra type-casts in between.
While you could use the GCC _Complex extension here I opted to mark them
xfail
since I wanted to include detection over the widenings next year.
Secondly the double tests were being skipped because Adv. SIMD was missing
from
targets supporting Complex Double vectorization.
With these changes all other tests run and pass and only XFAIL ones are
correctly the _Float16 ones. Sorry for missing this before, testing should
now
cover all cases.
gcc/ChangeLog:
PR tree-optimization/103311
PR target/103330
* tree-vect-slp-patterns.c (vect_validate_multiplication): Fix CONJ
test to new codegen.
(complex_mul_pattern::matches): Move check downwards.
gcc/testsuite/ChangeLog:
PR tree-optimization/103311
PR target/103330
* gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-double.c: Fix
it.
* gcc.dg/vect/complex/fast-math-bb-slp-complex-mla-float.c:
Likewise.
* gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-double.c:
Likewise.
* gcc.dg/vect/complex/fast-math-bb-slp-complex-mls-float.c:
Likewise.
* gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-double.c:
Likewise.
* gcc.dg/vect/complex/fast-math-bb-slp-complex-mul-float.c:
Likewise.
* lib/target-supports.exp
(check_effective_target_vect_complex_add_double): Add Adv. SIMD.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug tree-optimization/103311] [12 Regression] ICE in complex_mul_pattern::build(vec_info*) since r12-4785-ged3de62ac949c92ad41ef6de7cc926fbb2a510ce
2021-11-18 10:42 [Bug tree-optimization/103311] New: [12 Regression] ICE in complex_mul_pattern::build(vec_info*) asolokha at gmx dot com
` (6 preceding siblings ...)
2021-11-19 15:13 ` cvs-commit at gcc dot gnu.org
@ 2021-11-19 15:14 ` tnfchris at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2021-11-19 15:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103311
Tamar Christina <tnfchris at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|REOPENED |RESOLVED
--- Comment #7 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
Really fixed now.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2021-11-19 15:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-18 10:42 [Bug tree-optimization/103311] New: [12 Regression] ICE in complex_mul_pattern::build(vec_info*) asolokha at gmx dot com
2021-11-18 11:26 ` [Bug tree-optimization/103311] " rguenth at gcc dot gnu.org
2021-11-18 11:42 ` [Bug tree-optimization/103311] [12 Regression] ICE in complex_mul_pattern::build(vec_info*) since r12-4785-ged3de62ac949c92ad41ef6de7cc926fbb2a510ce marxin at gcc dot gnu.org
2021-11-18 11:46 ` tnfchris at gcc dot gnu.org
2021-11-18 17:12 ` cvs-commit at gcc dot gnu.org
2021-11-18 17:21 ` tnfchris at gcc dot gnu.org
2021-11-18 23:01 ` tnfchris at gcc dot gnu.org
2021-11-19 15:13 ` cvs-commit at gcc dot gnu.org
2021-11-19 15:14 ` tnfchris 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).