summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/add-of-carry.ll
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2019-07-04 18:18:46 +0000
committerCraig Topper <craig.topper@intel.com>2019-07-04 18:18:46 +0000
commite9aed963ce36cd3af88abac77e98d2521ef8961e (patch)
treebcba8fa8b43119c72bc6694818ca6f5473511ede /llvm/test/CodeGen/X86/add-of-carry.ll
parent5816889c748b37e1c3f48e8799a3478cf5931f60 (diff)
downloadbcm5719-llvm-e9aed963ce36cd3af88abac77e98d2521ef8961e.tar.gz
bcm5719-llvm-e9aed963ce36cd3af88abac77e98d2521ef8961e.zip
[DAGCombiner] Don't combine (addcarry (uaddo X, Y), 0, Carry) -> (addcarry X, Y, Carry) if the Carry comes from the uaddo.
Summary: The uaddo won't be removed and the addcarry will still be dependent on the uaddo. So we'll just increase the use count of X and Y and potentially require a COPY. Reviewers: spatel, RKSimon, deadalnix Reviewed By: RKSimon Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D64190 llvm-svn: 365149
Diffstat (limited to 'llvm/test/CodeGen/X86/add-of-carry.ll')
-rw-r--r--llvm/test/CodeGen/X86/add-of-carry.ll6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/test/CodeGen/X86/add-of-carry.ll b/llvm/test/CodeGen/X86/add-of-carry.ll
index 1149ae57552..9bb50de25b2 100644
--- a/llvm/test/CodeGen/X86/add-of-carry.ll
+++ b/llvm/test/CodeGen/X86/add-of-carry.ll
@@ -9,11 +9,9 @@
define i32 @test1(i32 %sum, i32 %x) nounwind readnone ssp {
; CHECK-LABEL: test1:
; CHECK: # %bb.0:
-; CHECK-NEXT: movl {{[0-9]+}}(%esp), %ecx
; CHECK-NEXT: movl {{[0-9]+}}(%esp), %eax
-; CHECK-NEXT: movl %eax, %edx
-; CHECK-NEXT: addl %ecx, %edx
-; CHECK-NEXT: adcl %ecx, %eax
+; CHECK-NEXT: addl {{[0-9]+}}(%esp), %eax
+; CHECK-NEXT: adcl $0, %eax
; CHECK-NEXT: retl
%add4 = add i32 %x, %sum
%cmp = icmp ult i32 %add4, %x
OpenPOWER on IntegriCloud