aboutsummaryrefslogtreecommitdiff
path: root/gcc/fold-const.cc
diff options
context:
space:
mode:
authorRobin Dapp <rdapp@ventanamicro.com>2023-11-10 08:56:18 +0100
committerRobin Dapp <rdapp@ventanamicro.com>2023-11-10 14:43:21 +0100
commitd7b971cf61ae0091dbc777c9aa056e6f1293da2f (patch)
tree1be03b87b206e4e9185bebef71ed0b7a61f4ce23 /gcc/fold-const.cc
parentb70ad8c19aa8be672cdba6afe9cbab2d1254d127 (diff)
downloadgcc-d7b971cf61ae0091dbc777c9aa056e6f1293da2f.zip
gcc-d7b971cf61ae0091dbc777c9aa056e6f1293da2f.tar.gz
gcc-d7b971cf61ae0091dbc777c9aa056e6f1293da2f.tar.bz2
vect: Look through pattern stmt in fold_left_reduction.
It appears as if we "look through" a statement pattern in vect_finish_replace_stmt but not before when we replace the newly created vector statement's lhs. Then the lhs is the statement pattern's lhs while in vect_finish_replace_stmt we assert that it's from the statement the pattern replaced. This patch uses vect_orig_stmt on the scalar destination's definition so the replaced statement is used everywhere. gcc/ChangeLog: PR tree-optimization/112464 * tree-vect-loop.cc (vectorize_fold_left_reduction): Use vect_orig_stmt on scalar_dest_def_info. gcc/testsuite/ChangeLog: * gcc.target/i386/pr112464.c: New test.
Diffstat (limited to 'gcc/fold-const.cc')
0 files changed, 0 insertions, 0 deletions