OSDN Git Service

[DAGCombine] (uaddo X, (addcarry Y, 0, Carry)) -> (addcarry X, Y, Carry)
authorAmaury Sechet <deadalnix@gmail.com>
Tue, 2 May 2017 14:15:48 +0000 (14:15 +0000)
committerAmaury Sechet <deadalnix@gmail.com>
Tue, 2 May 2017 14:15:48 +0000 (14:15 +0000)
commitd3b7a7cfa094f9855210f09f33b4026a6df7cac4
tree2cd462a11b66a6e507a45c0a693d02fe797df2f2
parent14c3bbaef31e339487d855555d147a7c41580280
[DAGCombine] (uaddo X, (addcarry Y, 0, Carry)) -> (addcarry X, Y, Carry)

Summary: This is a common pattern that arise when legalizing large integers operations. Only do it when Y + 1 cannot overflow as this would change the carry behavior of uaddo .

Reviewers: jyknight, nemanjai, mkuper, spatel, RKSimon, zvi, bkramer

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D32687

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301922 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/adde-carry.ll
test/CodeGen/X86/mul-i1024.ll
test/CodeGen/X86/mul-i256.ll
test/CodeGen/X86/mul-i512.ll