diff options
| author | Geoff Berry <gberry@codeaurora.org> | 2018-02-01 18:54:01 +0000 |
|---|---|---|
| committer | Geoff Berry <gberry@codeaurora.org> | 2018-02-01 18:54:01 +0000 |
| commit | 94503c7bc3d70f51ab03c03b2067db3e973efa19 (patch) | |
| tree | 8db2d28d7793aa60b2cde1e630798f3e3c3fd6e7 /llvm/test/CodeGen/ARM | |
| parent | a95bd9f72414a7d26f21a4ee5a0f40ff1d0c951a (diff) | |
| download | bcm5719-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/ARM')
| -rw-r--r-- | llvm/test/CodeGen/ARM/atomic-op.ll | 6 | ||||
| -rw-r--r-- | llvm/test/CodeGen/ARM/intrinsics-overflow.ll | 2 | ||||
| -rw-r--r-- | llvm/test/CodeGen/ARM/select-imm.ll | 6 | ||||
| -rw-r--r-- | llvm/test/CodeGen/ARM/swifterror.ll | 2 |
4 files changed, 9 insertions, 7 deletions
diff --git a/llvm/test/CodeGen/ARM/atomic-op.ll b/llvm/test/CodeGen/ARM/atomic-op.ll index 644a7fbf8d9..2337e835480 100644 --- a/llvm/test/CodeGen/ARM/atomic-op.ll +++ b/llvm/test/CodeGen/ARM/atomic-op.ll @@ -287,7 +287,8 @@ define i32 @test_cmpxchg_fail_order(i32 *%addr, i32 %desired, i32 %new) { %pair = cmpxchg i32* %addr, i32 %desired, i32 %new seq_cst monotonic %oldval = extractvalue { i32, i1 } %pair, 0 -; CHECK-ARMV7: ldrex [[OLDVAL:r[0-9]+]], [r[[ADDR:[0-9]+]]] +; CHECK-ARMV7: mov r[[ADDR:[0-9]+]], r0 +; CHECK-ARMV7: ldrex [[OLDVAL:r[0-9]+]], [r0] ; CHECK-ARMV7: cmp [[OLDVAL]], r1 ; CHECK-ARMV7: bne [[FAIL_BB:\.?LBB[0-9]+_[0-9]+]] ; CHECK-ARMV7: dmb ish @@ -305,7 +306,8 @@ define i32 @test_cmpxchg_fail_order(i32 *%addr, i32 %desired, i32 %new) { ; CHECK-ARMV7: dmb ish ; CHECK-ARMV7: bx lr -; CHECK-T2: ldrex [[OLDVAL:r[0-9]+]], [r[[ADDR:[0-9]+]]] +; CHECK-T2: mov r[[ADDR:[0-9]+]], r0 +; CHECK-T2: ldrex [[OLDVAL:r[0-9]+]], [r0] ; CHECK-T2: cmp [[OLDVAL]], r1 ; CHECK-T2: bne [[FAIL_BB:\.?LBB.*]] ; CHECK-T2: dmb ish diff --git a/llvm/test/CodeGen/ARM/intrinsics-overflow.ll b/llvm/test/CodeGen/ARM/intrinsics-overflow.ll index 5f78b13c18d..835be7e949d 100644 --- a/llvm/test/CodeGen/ARM/intrinsics-overflow.ll +++ b/llvm/test/CodeGen/ARM/intrinsics-overflow.ll @@ -39,7 +39,7 @@ define i32 @sadd_overflow(i32 %a, i32 %b) #0 { ; ARM: mov pc, lr ; THUMBV6: mov r[[R2:[0-9]+]], r[[R0:[0-9]+]] - ; THUMBV6: adds r[[R3:[0-9]+]], r[[R2]], r[[R1:[0-9]+]] + ; THUMBV6: adds r[[R3:[0-9]+]], r[[R0]], r[[R1:[0-9]+]] ; THUMBV6: movs r[[R0]], #0 ; THUMBV6: movs r[[R1]], #1 ; THUMBV6: cmp r[[R3]], r[[R2]] diff --git a/llvm/test/CodeGen/ARM/select-imm.ll b/llvm/test/CodeGen/ARM/select-imm.ll index b608a200c5e..620e581f0fa 100644 --- a/llvm/test/CodeGen/ARM/select-imm.ll +++ b/llvm/test/CodeGen/ARM/select-imm.ll @@ -197,9 +197,9 @@ entry: ; ARMT2-LABEL: t8: ; ARMT2: mov r1, r0 +; ARMT2: cmp r0, #5 ; ARMT2: mov r0, #9 ; ARMT2: mov r4, #0 -; ARMT2: cmp r1, #5 ; ARMT2: movweq r4, #1 ; ARMT2: bl t7 @@ -213,8 +213,8 @@ entry: ; THUMB2-LABEL: t8: ; THUMB2: mov r1, r0 -; THUMB2: movs r4, #0 -; THUMB2: cmp r1, #5 +; THUMB2: cmp r0, #5 +; THUMB2: mov.w r4, #0 ; THUMB2: it eq ; THUMB2: moveq r4, #1 %cmp = icmp eq i32 %a, 5 diff --git a/llvm/test/CodeGen/ARM/swifterror.ll b/llvm/test/CodeGen/ARM/swifterror.ll index da7bbdb93d0..220c4adb55b 100644 --- a/llvm/test/CodeGen/ARM/swifterror.ll +++ b/llvm/test/CodeGen/ARM/swifterror.ll @@ -182,7 +182,7 @@ define float @foo_loop(%swift_error** swifterror %error_ptr_ref, i32 %cc, float ; CHECK-APPLE: beq ; CHECK-APPLE: mov r0, #16 ; CHECK-APPLE: malloc -; CHECK-APPLE: strb r{{.*}}, [{{.*}}[[ID]], #8] +; CHECK-APPLE: strb r{{.*}}, [r0, #8] ; CHECK-APPLE: ble ; CHECK-APPLE: mov r8, [[ID]] |

