Implement expansion in type legalization for add/sub with overflow. The
authorEli Friedman <eli.friedman@gmail.com>
Thu, 3 Jun 2010 03:49:50 +0000 (03:49 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Thu, 3 Jun 2010 03:49:50 +0000 (03:49 +0000)
commit268637ed0f34e10e4125e94c44ff3e2975a19166
tree610f0a9753ebeb3ed25fd52c3e281b60d66c0a3e
parentdb1bf34178aec96559cf2e7190accc484c85d3e2
Implement expansion in type legalization for add/sub with overflow.  The
expansion is the same as that used by LegalizeDAG.

The resulting code sucks in terms of performance/codesize on x86-32 for a
64-bit operation; I haven't looked into whether different expansions might be
better in general.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105378 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
lib/CodeGen/SelectionDAG/LegalizeTypes.h
test/CodeGen/Generic/add-with-overflow-128.ll [new file with mode: 0644]