]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Alpha: Adjust MEM alignment for block clear [PR115459]
authorMaciej W. Rozycki <macro@orcam.me.uk>
Wed, 25 Dec 2024 22:23:40 +0000 (22:23 +0000)
committerMaciej W. Rozycki <macro@orcam.me.uk>
Wed, 25 Dec 2024 22:23:40 +0000 (22:23 +0000)
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.

gcc/config/alpha/alpha.cc

index 58da4a886321c9afb62f7a7aa4c707245f3bc749..7c28743f2ee33f1fa1641508ba7d7c5e42ae722a 100644 (file)
@@ -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.  */