[PATCH] D38128: Handle COPYs of physregs better (regalloc hints)

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 25 23:57:50 PST 2018


jonpa updated this revision to Diff 135853.
jonpa added a comment.

Test updated again.


https://reviews.llvm.org/D38128

Files:
  lib/Target/XCore/XCoreRegisterInfo.h
  test/CodeGen/XCore/byVal.ll


Index: test/CodeGen/XCore/byVal.ll
===================================================================
--- test/CodeGen/XCore/byVal.ll
+++ test/CodeGen/XCore/byVal.ll
@@ -38,13 +38,13 @@
 ; CHECK-LABEL: f2Test
 ; CHECK: extsp 4
 ; CHECK: stw lr, sp[1]
+; CHECK: mov r11, r1
 ; CHECK: stw r2, sp[3]
 ; CHECK: stw r3, sp[4]
 ; CHECK: ldw r0, r0[0]
 ; CHECK: stw r0, sp[2]
-; CHECK: ldaw r2, sp[2]
-; CHECK: mov r0, r1
-; CHECK: mov r1, r2
+; CHECK: ldaw r1, sp[2]
+; CHECK: mov r0, r11
 ; CHECK: bl f2
 ; CHECK: ldw lr, sp[1]
 ; CHECK: ldaw sp, sp[4]
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;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38128.135853.patch
Type: text/x-patch
Size: 1065 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180226/d6c766a5/attachment.bin>


More information about the llvm-commits mailing list