diff options
author | Richard Biener <rguenther@suse.de> | 2021-04-07 13:17:05 +0200 |
---|---|---|
committer | Richard Biener <rguenther@suse.de> | 2021-04-07 13:25:06 +0200 |
commit | c01ae2ab6b227e21835d128c90e974dce4604be9 (patch) | |
tree | 27b82badec76eac80372b97548289cf35fb33a92 /gcc/varasm.c | |
parent | 0d6ad10c170e3670f0b5e3709e0fa6e76b7065b3 (diff) | |
download | gcc-c01ae2ab6b227e21835d128c90e974dce4604be9.zip gcc-c01ae2ab6b227e21835d128c90e974dce4604be9.tar.gz gcc-c01ae2ab6b227e21835d128c90e974dce4604be9.tar.bz2 |
tree-optimization/99954 - fix loop distribution memcpy classification
This fixes bogus classification of a copy as memcpy. We cannot use
plain dependence analysis to decide between memcpy and memmove when
it computes no dependence. Instead we have to try harder later which
the patch does for the gcc.dg/tree-ssa/ldist-24.c testcase by resorting
to tree-affine to compute the difference between src and dest and
compare against the copy size.
2021-04-07 Richard Biener <rguenther@suse.de>
PR tree-optimization/99954
* tree-loop-distribution.c: Include tree-affine.h.
(generate_memcpy_builtin): Try using tree-affine to prove
non-overlap.
(loop_distribution::classify_builtin_ldst): Always classify
as PKIND_MEMMOVE.
* gcc.dg/torture/pr99954.c: New testcase.
Diffstat (limited to 'gcc/varasm.c')
0 files changed, 0 insertions, 0 deletions