summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AArch64/flags-multiuse.ll
diff options
context:
space:
mode:
authorGeoff Berry <gberry@codeaurora.org>2018-02-01 18:54:01 +0000
committerGeoff Berry <gberry@codeaurora.org>2018-02-01 18:54:01 +0000
commit94503c7bc3d70f51ab03c03b2067db3e973efa19 (patch)
tree8db2d28d7793aa60b2cde1e630798f3e3c3fd6e7 /llvm/test/CodeGen/AArch64/flags-multiuse.ll
parenta95bd9f72414a7d26f21a4ee5a0f40ff1d0c951a (diff)
downloadbcm5719-llvm-94503c7bc3d70f51ab03c03b2067db3e973efa19.tar.gz
bcm5719-llvm-94503c7bc3d70f51ab03c03b2067db3e973efa19.zip
[MachineCopyPropagation] Extend pass to do COPY source forwarding
Summary: This change extends MachineCopyPropagation to do COPY source forwarding and adds an additional run of the pass to the default pass pipeline just after register allocation. This version of this patch uses the newly added MachineOperand::isRenamable bit to avoid forwarding registers is such a way as to violate constraints that aren't captured in the Machine IR (e.g. ABI or ISA constraints). This change is a continuation of the work started in D30751. Reviewers: qcolombet, javed.absar, MatzeB, jonpa, tstellar Subscribers: tpr, mgorny, mcrosier, nhaehnle, nemanjai, jyknight, hfinkel, arsenm, inouehrs, eraman, sdardis, guyblank, fedor.sergeev, aheejin, dschuff, jfb, myatsina, llvm-commits Differential Revision: https://reviews.llvm.org/D41835 llvm-svn: 323991
Diffstat (limited to 'llvm/test/CodeGen/AArch64/flags-multiuse.ll')
-rw-r--r--llvm/test/CodeGen/AArch64/flags-multiuse.ll5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/AArch64/flags-multiuse.ll b/llvm/test/CodeGen/AArch64/flags-multiuse.ll
index 0827fb8c9e8..a13f7e1e34a 100644
--- a/llvm/test/CodeGen/AArch64/flags-multiuse.ll
+++ b/llvm/test/CodeGen/AArch64/flags-multiuse.ll
@@ -17,6 +17,9 @@ define i32 @test_multiflag(i32 %n, i32 %m, i32 %o) {
%val = zext i1 %test to i32
; CHECK: cset {{[xw][0-9]+}}, ne
+; CHECK: mov [[RHSCOPY:w[0-9]+]], [[RHS]]
+; CHECK: mov [[LHSCOPY:w[0-9]+]], [[LHS]]
+
store i32 %val, i32* @var
call void @bar()
@@ -25,7 +28,7 @@ define i32 @test_multiflag(i32 %n, i32 %m, i32 %o) {
; Currently, the comparison is emitted again. An MSR/MRS pair would also be
; acceptable, but assuming the call preserves NZCV is not.
br i1 %test, label %iftrue, label %iffalse
-; CHECK: cmp [[LHS]], [[RHS]]
+; CHECK: cmp [[LHSCOPY]], [[RHSCOPY]]
; CHECK: b.eq
iftrue:
OpenPOWER on IntegriCloud