summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2011-01-06 01:02:44 +0000
committerEvan Cheng <evan.cheng@apple.com>2011-01-06 01:02:44 +0000
commitd08e5b48bc5d9177b1d70a1980a7805420a99085 (patch)
treeeba84180bd1bb0bc4918cdce0b29604e8f4b8d9e /lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
parenta99ec28134c2fd0a21c446a58bf6406b8aa1a580 (diff)
downloadllvm-d08e5b48bc5d9177b1d70a1980a7805420a99085.tar.gz
llvm-d08e5b48bc5d9177b1d70a1980a7805420a99085.tar.bz2
llvm-d08e5b48bc5d9177b1d70a1980a7805420a99085.tar.xz
Avoid zero extend bit test operands to pointer type if all the masks fit in
the original type of the switch statement key. rdar://8781238 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122935 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
index dfd1df75f1..8f466d913b 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
@@ -258,15 +258,16 @@ private:
struct BitTestBlock {
BitTestBlock(APInt F, APInt R, const Value* SV,
- unsigned Rg, bool E,
+ unsigned Rg, EVT RgVT, bool E,
MachineBasicBlock* P, MachineBasicBlock* D,
const BitTestInfo& C):
- First(F), Range(R), SValue(SV), Reg(Rg), Emitted(E),
+ First(F), Range(R), SValue(SV), Reg(Rg), RegVT(RgVT), Emitted(E),
Parent(P), Default(D), Cases(C) { }
APInt First;
APInt Range;
const Value *SValue;
unsigned Reg;
+ EVT RegVT;
bool Emitted;
MachineBasicBlock *Parent;
MachineBasicBlock *Default;
@@ -435,7 +436,8 @@ public:
void visitSwitchCase(CaseBlock &CB,
MachineBasicBlock *SwitchBB);
void visitBitTestHeader(BitTestBlock &B, MachineBasicBlock *SwitchBB);
- void visitBitTestCase(MachineBasicBlock* NextMBB,
+ void visitBitTestCase(BitTestBlock &BB,
+ MachineBasicBlock* NextMBB,
unsigned Reg,
BitTestCase &B,
MachineBasicBlock *SwitchBB);