The split for movv8di is not ready to handle the case where the setting register overlaps with the address of the memory that is being load. Fixing the split than just making the output constraint as an early clobber for this alternative. The split would first need to figure out which register is overlapping with the address and then only emit that move last.
Build and tested for aarch64-linux-gnu with no regressions gcc/ChangeLog: * config/aarch64/aarch64-simd.md (*aarch64_movv8di): Mark the last alternative's output constraint as an early clobber. Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com> --- gcc/config/aarch64/aarch64-simd.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/aarch64/aarch64-simd.md b/gcc/config/aarch64/aarch64-simd.md index 662ef696630..ba079298b84 100644 --- a/gcc/config/aarch64/aarch64-simd.md +++ b/gcc/config/aarch64/aarch64-simd.md @@ -7985,7 +7985,7 @@ (define_insn "*aarch64_mov<mode>" ) (define_insn "*aarch64_movv8di" - [(set (match_operand:V8DI 0 "nonimmediate_operand" "=r,m,r") + [(set (match_operand:V8DI 0 "nonimmediate_operand" "=r,m,&r") (match_operand:V8DI 1 "general_operand" " r,r,m"))] "(register_operand (operands[0], V8DImode) || register_operand (operands[1], V8DImode))" -- 2.39.3