aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Utils/LowerSwitch.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-23 06:05:41 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-23 06:05:41 +0000
commite4d87aa2de6e52952dca73716386db09aad5a8fd (patch)
treece8c6e6ddc845de3585020c856118892f4206593 /lib/Transforms/Utils/LowerSwitch.cpp
parentadd2bd7f5941537a97a41e037ae2277fbeed0b4f (diff)
For PR950:
This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32751 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Utils/LowerSwitch.cpp')
-rw-r--r--lib/Transforms/Utils/LowerSwitch.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/Transforms/Utils/LowerSwitch.cpp b/lib/Transforms/Utils/LowerSwitch.cpp
index 69df51c792..b2974a98c8 100644
--- a/lib/Transforms/Utils/LowerSwitch.cpp
+++ b/lib/Transforms/Utils/LowerSwitch.cpp
@@ -143,8 +143,7 @@ BasicBlock* LowerSwitch::switchConvert(CaseItr Begin, CaseItr End,
BasicBlock* NewNode = new BasicBlock("NodeBlock");
F->getBasicBlockList().insert(OrigBlock->getNext(), NewNode);
- SetCondInst* Comp = new SetCondInst(Instruction::SetLT, Val, Pivot.first,
- "Pivot");
+ ICmpInst* Comp = new ICmpInst(ICmpInst::ICMP_ULT, Val, Pivot.first, "Pivot");
NewNode->getInstList().push_back(Comp);
new BranchInst(LBranch, RBranch, Comp, NewNode);
return NewNode;
@@ -165,8 +164,8 @@ BasicBlock* LowerSwitch::newLeafBlock(Case& Leaf, Value* Val,
F->getBasicBlockList().insert(OrigBlock->getNext(), NewLeaf);
// Make the seteq instruction...
- SetCondInst* Comp = new SetCondInst(Instruction::SetEQ, Val,
- Leaf.first, "SwitchLeaf");
+ ICmpInst* Comp = new ICmpInst(ICmpInst::ICMP_EQ, Val,
+ Leaf.first, "SwitchLeaf");
NewLeaf->getInstList().push_back(Comp);
// Make the conditional branch...