diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-12-23 06:05:41 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-12-23 06:05:41 +0000 |
commit | 266e42b312ab7c457d1eab01475f63e59f60933c (patch) | |
tree | 7ac7dbe9437ac2cdbbf532cacb9e043dc6f5645a /llvm/lib/Transforms/Utils/LowerSwitch.cpp | |
parent | f171af97d50df7ebd7661756e89eef2295014e81 (diff) | |
download | bcm5719-llvm-266e42b312ab7c457d1eab01475f63e59f60933c.tar.gz bcm5719-llvm-266e42b312ab7c457d1eab01475f63e59f60933c.zip |
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.
llvm-svn: 32751
Diffstat (limited to 'llvm/lib/Transforms/Utils/LowerSwitch.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/LowerSwitch.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/LowerSwitch.cpp b/llvm/lib/Transforms/Utils/LowerSwitch.cpp index 69df51c7921..b2974a98c80 100644 --- a/llvm/lib/Transforms/Utils/LowerSwitch.cpp +++ b/llvm/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... |