summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitac730dd2d1d858a01e76042b52428851f11a3e13 (patch)
treed42c1e01ccc6a0f4d85e9b24e6b398b096ea3d72 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
parent3b949bcaf345d15cb451f54b19bc4c60cf625a3d (diff)
downloadbcm5719-llvm-ac730dd2d1d858a01e76042b52428851f11a3e13.tar.gz
bcm5719-llvm-ac730dd2d1d858a01e76042b52428851f11a3e13.zip
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 llvm-svn: 122935
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
index dfd1df75f10..8f466d913bb 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
+++ b/llvm/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);
OpenPOWER on IntegriCloud