Cleanup of the [SU]ADDO type legalization code. Patch by Duncan!

"It simplifies the type legalization part a bit, and produces better code by
teaching SelectionDAG about the extra bits in an i8 SADDO/UADDO node.  In
essence, I spontaneously decided that on x86 this i8 boolean result would be
either 0 or 1, and on other platforms 0/1 or 0/-1, depending on whether the
platform likes it's boolean zero extended or sign extended."


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59864 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling
2008-11-22 07:24:01 +00:00
parent 8ac0d4b4fb
commit 253174bf50
4 changed files with 31 additions and 28 deletions

View File

@@ -250,12 +250,13 @@ namespace ISD {
// values.
ADDE, SUBE,
// RESULT, BOOL = [SU]ADDO(LHS, RHS) - Overflow-aware nodes for arithmetic
// operations. These nodes takes two operands: the normal lhs and rhs to the
// add. They produce two results: the normal result of the add, and a
// boolean to indicate if an overflow occured (*not* a flag, because it may
// be stored to memory, etc.). These nodes is generated from the
// llvm.[su]add.with.overflow intrinsics.
// RESULT, BOOL = [SU]ADDO(LHS, RHS) - Overflow-aware nodes for addition.
// These nodes take two operands: the normal LHS and RHS to the add. They
// produce two results: the normal result of the add, and a boolean that
// indicates if an overflow occured (*not* a flag, because it may be stored
// to memory, etc.). If the type of the boolean is not i1 then the high
// bits conform to getSetCCResultContents.
// These nodes are generated from the llvm.[su]add.with.overflow intrinsics.
SADDO, UADDO,
// Simple binary floating point operators.