tree-optimization/104240 - SLP discovery with swapped comparisons
authorRichard Biener <rguenther@suse.de>
Mon, 2 May 2022 10:01:51 +0000 (12:01 +0200)
committerRichard Biener <rguenther@suse.de>
Mon, 2 May 2022 11:16:59 +0000 (13:16 +0200)
commit41e3db05d697405256b6002d8432955a93d249f1
tree40b90a111fceeacd1629f52b7d936c8713ff767e
parent86d821ddf5615e693ead667b2580898f46de8eb9
tree-optimization/104240 - SLP discovery with swapped comparisons

The following extends SLP discovery to handle swapped operands
in comparisons.

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

PR tree-optimization/104240
* tree-vect-slp.cc (op1_op0_map): New.
(vect_get_operand_map): Handle compares.
(vect_build_slp_tree_1): Support swapped operands for
tcc_comparison.

* gcc.dg/vect/bb-slp-pr104240.c: New testcase.
gcc/testsuite/gcc.dg/vect/bb-slp-pr104240.c [new file with mode: 0644]
gcc/tree-vect-slp.cc