[Bug tree-optimization/103311] [12 Regression] ICE in complex_mul_pattern::build(vec_info*) since r12-4785-ged3de62ac949c92ad41ef6de7cc926fbb2a510ce

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

Tamar Christina  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|REOPENED|RESOLVED

--- Comment #7 from Tamar Christina  ---
Really fixed now.

[Bug tree-optimization/103311] [12 Regression] ICE in complex_mul_pattern::build(vec_info*) since r12-4785-ged3de62ac949c92ad41ef6de7cc926fbb2a510ce

2021-11-19 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103311

--- Comment #6 from CVS Commits  ---
The master branch has been updated by Tamar Christina :

https://gcc.gnu.org/g:487d604b6fa0f0a981eadc216d9e481d08ed7e7b

commit r12-5407-g487d604b6fa0f0a981eadc216d9e481d08ed7e7b
Author: Tamar Christina 
Date:   Fri Nov 19 15:12:38 2021 +

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.

[Bug tree-optimization/103311] [12 Regression] ICE in complex_mul_pattern::build(vec_info*) since r12-4785-ged3de62ac949c92ad41ef6de7cc926fbb2a510ce

2021-11-18 Thread tnfchris at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103311

Tamar Christina  changed:

   What|Removed |Added

 Resolution|FIXED   |---
 Status|RESOLVED|REOPENED

--- Comment #5 from Tamar Christina  ---
MLA ended up getting not detected, for some reason the testcases where getting
skipped.

[Bug tree-optimization/103311] [12 Regression] ICE in complex_mul_pattern::build(vec_info*) since r12-4785-ged3de62ac949c92ad41ef6de7cc926fbb2a510ce

2021-11-18 Thread tnfchris at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103311

Tamar Christina  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #4 from Tamar Christina  ---
Fixed on trunk.

[Bug tree-optimization/103311] [12 Regression] ICE in complex_mul_pattern::build(vec_info*) since r12-4785-ged3de62ac949c92ad41ef6de7cc926fbb2a510ce

2021-11-18 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103311

--- Comment #3 from CVS Commits  ---
The master branch has been updated by Tamar Christina :

https://gcc.gnu.org/g:4f0a2f5a3ddb1024b885c066a18caae4d733bb6c

commit r12-5378-g4f0a2f5a3ddb1024b885c066a18caae4d733bb6c
Author: Tamar Christina 
Date:   Thu Nov 18 17:10:36 2021 +

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.

[Bug tree-optimization/103311] [12 Regression] ICE in complex_mul_pattern::build(vec_info*) since r12-4785-ged3de62ac949c92ad41ef6de7cc926fbb2a510ce

2021-11-18 Thread tnfchris at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103311

Tamar Christina  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  ---
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.

[Bug tree-optimization/103311] [12 Regression] ICE in complex_mul_pattern::build(vec_info*) since r12-4785-ged3de62ac949c92ad41ef6de7cc926fbb2a510ce

2021-11-18 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103311

Martin Liška  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  ---
Started with r12-4785-ged3de62ac949c92ad41ef6de7cc926fbb2a510ce.