Index: lib/Target/XCore/XCoreRegisterInfo.h =================================================================== --- lib/Target/XCore/XCoreRegisterInfo.h +++ lib/Target/XCore/XCoreRegisterInfo.h @@ -33,6 +33,8 @@ BitVector getReservedRegs(const MachineFunction &MF) const override; + bool enableMultipleCopyHints() const override { return true; } + bool requiresRegisterScavenging(const MachineFunction &MF) const override; bool trackLivenessAfterRegAlloc(const MachineFunction &MF) const override; Index: test/CodeGen/XCore/byVal.ll =================================================================== --- test/CodeGen/XCore/byVal.ll +++ test/CodeGen/XCore/byVal.ll @@ -42,9 +42,8 @@ ; CHECK: stw r3, sp[4] ; CHECK: ldw r0, r0[0] ; CHECK: stw r0, sp[2] -; CHECK: ldaw r2, sp[2] +; CHECK: ldaw r1, sp[2] ; CHECK: mov r0, r1 -; CHECK: mov r1, r2 ; CHECK: bl f2 ; CHECK: ldw lr, sp[1] ; CHECK: ldaw sp, sp[4]