diff options
author | Dale Johannesen <dalej@apple.com> | 2009-06-01 23:27:20 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2009-06-01 23:27:20 +0000 |
commit | 4150d83abe90a5da4ddf86433b7bf4329acfa57c (patch) | |
tree | f6d49f1a1eadb573ca9969173c76b891c035eb53 /lib/Target/X86/X86ISelLowering.h | |
parent | 83138998513faed0c1d31e712ac6e6d5e6ee8d91 (diff) | |
download | external_llvm-4150d83abe90a5da4ddf86433b7bf4329acfa57c.zip external_llvm-4150d83abe90a5da4ddf86433b7bf4329acfa57c.tar.gz external_llvm-4150d83abe90a5da4ddf86433b7bf4329acfa57c.tar.bz2 |
Make the implicit inputs and outputs of target-independent
ADDC/ADDE use MVT::i1 (later, whatever it gets legalized to)
instead of MVT::Flag. Remove CARRY_FALSE in favor of 0; adjust
all target-independent code to use this format.
Most targets will still produce a Flag-setting target-dependent
version when selection is done. X86 is converted to use i32
instead, which means TableGen needs to produce different code
in xxxGenDAGISel.inc. This keys off the new supportsHasI1 bit
in xxxInstrInfo, currently set only for X86; in principle this
is temporary and should go away when all other targets have
been converted. All relevant X86 instruction patterns are
modified to represent setting and using EFLAGS explicitly. The
same can be done on other targets.
The immediate behavior change is that an ADC/ADD pair are no
longer tightly coupled in the X86 scheduler; they can be
separated by instructions that don't clobber the flags (MOV).
I will soon add some peephole optimizations based on using
other instructions that set the flags to feed into ADC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72707 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86ISelLowering.h')
-rw-r--r-- | lib/Target/X86/X86ISelLowering.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/Target/X86/X86ISelLowering.h b/lib/Target/X86/X86ISelLowering.h index 550f8bd..78d95c0 100644 --- a/lib/Target/X86/X86ISelLowering.h +++ b/lib/Target/X86/X86ISelLowering.h @@ -243,6 +243,14 @@ namespace llvm { ADD, SUB, SMUL, UMUL, INC, DEC, + // ADDC, SUBC - Arithmetic operations setting carry bit. The normal + // arithmetic operations do this, but they represent it as Flag, and + // we want the i32 EFLAGS register here. + ADDC, SUBC, + + // ADDE, SUBE - Arithmetic operations with extra FLAGS (EFLAGS) inputs. + ADDE, SUBE, + // MUL_IMM - X86 specific multiply by immediate. MUL_IMM }; @@ -576,7 +584,9 @@ namespace llvm { std::pair<SDValue,SDValue> FP_TO_INTHelper(SDValue Op, SelectionDAG &DAG, bool isSigned); - + + SDValue LowerADDSUBC(SDValue Op, SelectionDAG &DAG); + SDValue LowerADDSUBE(SDValue Op, SelectionDAG &DAG); SDValue LowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG); SDValue LowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG); SDValue LowerEXTRACT_VECTOR_ELT(SDValue Op, SelectionDAG &DAG); |