summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/AArch64/flags-multiuse.ll
diff options
context:
space:
mode:
authorGeoff Berry <gberry@codeaurora.org>2017-08-17 23:06:55 +0000
committerGeoff Berry <gberry@codeaurora.org>2017-08-17 23:06:55 +0000
commit51f52c4fca3e517eb4bb231e551fc66bbfcd14cd (patch)
tree8e0bcc9d74cfa356b585b073849db3534e1e41db /llvm/test/CodeGen/AArch64/flags-multiuse.ll
parentdd616e95196312291676d787a244dcb3a686e2c4 (diff)
downloadbcm5719-llvm-51f52c4fca3e517eb4bb231e551fc66bbfcd14cd.tar.gz
bcm5719-llvm-51f52c4fca3e517eb4bb231e551fc66bbfcd14cd.zip
Re-enable "[MachineCopyPropagation] Extend pass to do COPY source forwarding"
Two issues identified by buildbots were addressed: - The pass no longer forwards COPYs to physical register uses, since doing so can break code that implicitly relies on the physical register number of the use. - The pass no longer forwards COPYs to undef uses, since doing so can break the machine verifier by creating LiveRanges that don't end on a use (since the undef operand is not considered a use). [MachineCopyPropagation] Extend pass to do COPY source forwarding This change extends MachineCopyPropagation to do COPY source forwarding. This change also extends the MachineCopyPropagation pass to be able to be run during register allocation, after physical registers have been assigned, but before the virtual registers have been re-written, which allows it to remove virtual register COPY LiveIntervals that become dead through the forwarding of all of their uses. Reviewers: qcolombet, javed.absar, MatzeB, jonpa Subscribers: jyknight, nemanjai, llvm-commits, nhaehnle, mcrosier, mgorny Differential Revision: https://reviews.llvm.org/D30751 llvm-svn: 311135
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