For PR950:
[oota-llvm.git] / lib / Transforms / Utils / LowerSwitch.cpp
index 69df51c79219f27f10ddd7e886b59c59cfafd599..b2974a98c8028ea40dc2601bdd3294f79ad8dbac 100644 (file)
@@ -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...