middle-end/104467 - fix vector extract simplification
authorRichard Biener <rguenther@suse.de>
Thu, 10 Feb 2022 09:01:20 +0000 (10:01 +0100)
committerRichard Biener <rguenther@suse.de>
Thu, 10 Feb 2022 09:54:43 +0000 (10:54 +0100)
commit4a8083285c3edf50088a095870b217ab0881dff0
tree0d9e7fb081110611a5802296362af21a1af1693c
parent1b72d456b2a88218ed440655ef0b9e29b4ef63a9
middle-end/104467 - fix vector extract simplification

This fixes a bogus vector type used for a CTOR build as part of
vector extract simplification.  The code failed to consider a
CTOR of vector elements.

2022-02-10  Richard Biener  <rguenther@suse.de>

PR middle-end/104467
* match.pd (vector extract simplification): Multiply the
number of CTOR elements with the number of element elements.

* gcc.dg/torture/pr104467.c: New testcase.
gcc/match.pd
gcc/testsuite/gcc.dg/torture/pr104467.c [new file with mode: 0644]