diff options
author | Maciej W. Rozycki <macro@orcam.me.uk> | 2024-12-25 22:23:40 +0000 |
---|---|---|
committer | Maciej W. Rozycki <macro@orcam.me.uk> | 2024-12-25 22:23:40 +0000 |
commit | 2984a3fac3d6b98e2cd6d7ee1c701159be86af78 (patch) | |
tree | d4c0f6622af40068db7c6926eaebcb4947c33d98 /gcc | |
parent | 6036a1a479154706a3a7c779ee28e74b03357c55 (diff) | |
download | gcc-2984a3fac3d6b98e2cd6d7ee1c701159be86af78.zip gcc-2984a3fac3d6b98e2cd6d7ee1c701159be86af78.tar.gz gcc-2984a3fac3d6b98e2cd6d7ee1c701159be86af78.tar.bz2 |
Alpha: Adjust MEM alignment for block clear [PR115459]
By inference it appears to me that the same fix for PR target/115459
needs to be applied to the block clear operation that has been done for
block move, as implemented by commit ccfe71518039 ("[alpha] adjust MEM
alignment for block move [PR115459]").
gcc/
PR target/115459
* config/alpha/alpha.cc (alpha_expand_block_clear): Adjust MEM
to match inferred alignment.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/alpha/alpha.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/config/alpha/alpha.cc b/gcc/config/alpha/alpha.cc index 58da4a8..7c28743 100644 --- a/gcc/config/alpha/alpha.cc +++ b/gcc/config/alpha/alpha.cc @@ -4076,6 +4076,12 @@ alpha_expand_block_clear (rtx operands[]) else if (a >= 16) align = a, alignofs = 2 - c % 2; } + + if (MEM_P (orig_dst) && MEM_ALIGN (orig_dst) < align) + { + orig_dst = shallow_copy_rtx (orig_dst); + set_mem_align (orig_dst, align); + } } /* Handle an unaligned prefix first. */ |