[PATCH] D38128: Handle COPYs of physregs better (regalloc hints)
Jonas Paulsson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 18 02:35:47 PST 2018
jonpa updated this revision to Diff 134827.
jonpa added a reviewer: kparzysz.
jonpa added a comment.
[Hexagon] Enabled with updated tests.
Please take a look at the test updates.
https://reviews.llvm.org/D38128
Files:
lib/Target/Hexagon/HexagonRegisterInfo.h
test/CodeGen/Hexagon/autohvx/reg-sequence.ll
test/CodeGen/Hexagon/mul64-sext.ll
test/CodeGen/Hexagon/pred-absolute-store.ll
Index: test/CodeGen/Hexagon/pred-absolute-store.ll
===================================================================
--- test/CodeGen/Hexagon/pred-absolute-store.ll
+++ test/CodeGen/Hexagon/pred-absolute-store.ll
@@ -1,7 +1,7 @@
; RUN: llc -march=hexagon < %s | FileCheck %s
; Check that we are able to predicate instructions with absolute
; addressing mode.
-; CHECK: if ({{!?}}p{{[0-3]}}) memw(##gvar) = r{{[0-9]+}}
+; CHECK: if ({{!?}}p{{[0-3]}}.new) memw(##gvar) = r{{[0-9]+}}
@gvar = external global i32
define i32 @test2(i32 %a, i32 %b) nounwind {
Index: test/CodeGen/Hexagon/mul64-sext.ll
===================================================================
--- test/CodeGen/Hexagon/mul64-sext.ll
+++ test/CodeGen/Hexagon/mul64-sext.ll
@@ -75,9 +75,9 @@
}
; CHECK-LABEL: mul_nac_2
-; CHECK: r0 = memw(r0+#0)
-; CHECK: r5:4 -= mpy(r2,r0)
; CHECK: r1:0 = combine(r5,r4)
+; CHECK: r6 = memw(r0+#0)
+; CHECK: r1:0 -= mpy(r2,r6)
; CHECK: jumpr r31
define i64 @mul_nac_2(i32* %a0, i64 %a1, i64 %a2) #0 {
b3:
Index: test/CodeGen/Hexagon/autohvx/reg-sequence.ll
===================================================================
--- test/CodeGen/Hexagon/autohvx/reg-sequence.ll
+++ test/CodeGen/Hexagon/autohvx/reg-sequence.ll
@@ -99,8 +99,8 @@
}
; CHECK-LABEL: test_22:
-; CHECK: v3 = v2
; CHECK: vcombine(v3,v2)
+; CHECK: v1 = v0
; Result: v1:0 = vcombine(v2,v2)
define <128 x i8> @test_22(<128 x i8> %a0, <128 x i8> %a1) #0 {
b2:
@@ -145,8 +145,8 @@
}
; CHECK-LABEL: test_33:
-; CHECK: v2 = v3
; CHECK: vcombine(v3,v2)
+; CHECK: v0 = v1
; Result: v1:0 = vcombine(v3,v3)
define <128 x i8> @test_33(<128 x i8> %a0, <128 x i8> %a1) #0 {
b2:
Index: lib/Target/Hexagon/HexagonRegisterInfo.h
===================================================================
--- lib/Target/Hexagon/HexagonRegisterInfo.h
+++ lib/Target/Hexagon/HexagonRegisterInfo.h
@@ -39,6 +39,8 @@
BitVector getReservedRegs(const MachineFunction &MF) const override;
+ bool enableMultipleCopyHints() const override { return true; }
+
void eliminateFrameIndex(MachineBasicBlock::iterator II, int SPAdj,
unsigned FIOperandNum, RegScavenger *RS = nullptr) const override;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38128.134827.patch
Type: text/x-patch
Size: 2190 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180218/df1ee1fd/attachment.bin>
More information about the llvm-commits
mailing list