aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorRobin Dapp <rdapp@ventanamicro.com>2023-11-21 12:51:12 +0100
committerRobin Dapp <rdapp@ventanamicro.com>2023-11-21 21:06:13 +0100
commit2bbc7f4ef6329df62146fd6d0da5f30750cc72b4 (patch)
tree5d230025f54ef3b66b2a30072f5f850a7d3e6fdb /libgcc
parent638c2f3caf01b1b570b403235ad6a28bd8245fc6 (diff)
downloadgcc-2bbc7f4ef6329df62146fd6d0da5f30750cc72b4.zip
gcc-2bbc7f4ef6329df62146fd6d0da5f30750cc72b4.tar.gz
gcc-2bbc7f4ef6329df62146fd6d0da5f30750cc72b4.tar.bz2
vect: Allow reduc_index != 1 for COND_OPs.
In PR112406 Tamar found another problem with COND_OP reductions. I wrongly assumed that the reduction variable will always remain in operand 1, just as we create the COND_OP in ifcvt. But of course, addition being commutative, we are free to swap operand 1 and 2 and we end up with e.g. _ifc__60 = .COND_ADD (_2, _6, MADPictureC1_lsm.10_25, MADPictureC1_lsm.10_25); which does not pass the asserts I put in place. This patch removes this restriction and allows the reduction index to be 2 as well. gcc/ChangeLog: PR middle-end/112406 * tree-vect-loop.cc (vectorize_fold_left_reduction): Allow reduction index != 1. (vect_transform_reduction): Handle reduction index != 1. gcc/testsuite/ChangeLog: * gcc.target/aarch64/pr112406-2.c: New test.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions