]> git.ipfire.org Git - thirdparty/gcc.git/commit
middle-end: Fix PR103007, add missing check on complex fms detection.
authorTamar Christina <tamar.christina@arm.com>
Tue, 2 Nov 2021 13:26:36 +0000 (13:26 +0000)
committerTamar Christina <tamar.christina@arm.com>
Tue, 2 Nov 2021 13:28:15 +0000 (13:28 +0000)
commit6cc8aa65fdeaefe9774d5e0d4e72c91f52313be1
tree5b5476a458e43186aaad88bf95cd6a07c99636db
parent268b43d2592c196ea101946d7063156a914b2713
middle-end: Fix PR103007, add missing check on complex fms detection.

The complex FMS detection is missing a check on if the nodes of the VEC_PERM
has the amount of children we expect before it recurses.

This check is there on MUL and FMA but was missing for FMS, due to this the
compiler goes on further than it should and hits an assert.

gcc/ChangeLog:

PR tree-optimization/103007
* tree-vect-slp-patterns.c (complex_fms_pattern::matches): Add elem
check.

gcc/testsuite/ChangeLog:

PR tree-optimization/103007
* g++.dg/pr103007.C: New test.
gcc/testsuite/g++.dg/pr103007.C [new file with mode: 0644]
gcc/tree-vect-slp-patterns.c