OSDN Git Service

[DAGCombine] (addcarry 0, 0, X) -> (ext/trunc X)
authorAmaury Sechet <deadalnix@gmail.com>
Fri, 19 May 2017 18:20:44 +0000 (18:20 +0000)
committerAmaury Sechet <deadalnix@gmail.com>
Fri, 19 May 2017 18:20:44 +0000 (18:20 +0000)
commit04150ba0accd2d42b429cc0fc10c024df4bafe9c
tree0f5f45e4b02ea36ba6795edc908c69d862fe74fa
parent435c118e779f664ed5b5536980b6e01ac64da5bc
[DAGCombine] (addcarry 0, 0, X) -> (ext/trunc X)

Summary:
While this makes some case better and some case worse - so it's unclear if it is a worthy combine just by itself - this is a useful canonicalisation.

As per discussion in D32756 .

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

Subscribers: llvm-commits

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

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