Implement variable-width shifts.

No testcase yet - it seems we're exposing generic codegen bugs.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91221 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov
2009-12-12 18:55:37 +00:00
parent 04ab19cb14
commit 2625de35ed
3 changed files with 170 additions and 7 deletions

View File

@@ -47,7 +47,7 @@ namespace llvm {
/// CMP - Compare instruction.
CMP,
/// SetCC. Operand 0 is condition code, and operand 1 is the flag
/// SetCC - Operand 0 is condition code, and operand 1 is the flag
/// operand produced by a CMP instruction.
SETCC,
@@ -57,9 +57,12 @@ namespace llvm {
/// instruction.
BR_CC,
/// SELECT_CC. Operand 0 and operand 1 are selection variable, operand 3
/// SELECT_CC - Operand 0 and operand 1 are selection variable, operand 3
/// is condition code and operand 4 is flag operand.
SELECT_CC
SELECT_CC,
/// SHL, SRA, SRL - Non-constant shifts.
SHL, SRA, SRL
};
}
@@ -99,6 +102,9 @@ namespace llvm {
MachineBasicBlock* EmitInstrWithCustomInserter(MachineInstr *MI,
MachineBasicBlock *BB,
DenseMap<MachineBasicBlock*, MachineBasicBlock*> *EM) const;
MachineBasicBlock* EmitShiftInstr(MachineInstr *MI,
MachineBasicBlock *BB,
DenseMap<MachineBasicBlock*, MachineBasicBlock*> *EM) const;
private:
SDValue LowerCCCCallTo(SDValue Chain, SDValue Callee,