diff options
author | Richard Biener <rguenther@suse.de> | 2024-08-02 13:49:34 +0200 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2024-08-06 09:33:12 +0200 |
commit | 8f3d0c8c3dd02d94635517c68fd314cbceed8373 (patch) | |
tree | 05d5a9f1f54ef349905c2081588ba335aaaf9fb8 /libcpp | |
parent | 3592d3f8cc4b89ae508c747a46a626d73cb9616d (diff) | |
download | gcc-8f3d0c8c3dd02d94635517c68fd314cbceed8373.zip gcc-8f3d0c8c3dd02d94635517c68fd314cbceed8373.tar.gz gcc-8f3d0c8c3dd02d94635517c68fd314cbceed8373.tar.bz2 |
middle-end/111821 - compile-time/memory-hog with large copy
The following fixes a compile-time/memory-hog when performing a
large aggregate copy to a small object allocated to a register.
While store_bit_field_1 called by store_integral_bit_field will
do nothign for accesses outside of the target the loop over the
source in store_integral_bit_field will still code-generate
the read parts for all words in the source. The following copies
the noop condition from store_bit_field_1 and terminates the
loop when it runs forward or avoid code-generating the read parts
when not.
PR middle-end/111821
* expmed.cc (store_integral_bit_field): Terminate the
word-wise copy loop when we get out of the destination
and do a forward copy. Skip the word if it would be
outside of the destination in case of a backward copy.
* gcc.dg/torture/pr111821.c: New testcase.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions