//===----------------------------------------------------------------------===//
#include "llvm/Transforms/Utils/CmpInstAnalysis.h"
-#include "llvm/Constants.h"
-#include "llvm/Instructions.h"
+#include "llvm/IR/Constants.h"
+#include "llvm/IR/Instructions.h"
using namespace llvm;
// True -> 7
default:
llvm_unreachable("Invalid ICmp predicate!");
- return 0;
}
}
Value *llvm::getICmpValue(bool Sign, unsigned Code, Value *LHS, Value *RHS,
CmpInst::Predicate &NewICmpPred) {
switch (Code) {
- default: assert(0 && "Illegal ICmp code!");
+ default: llvm_unreachable("Illegal ICmp code!");
case 0: // False.
return ConstantInt::get(CmpInst::makeCmpResultType(LHS->getType()), 0);
case 1: NewICmpPred = Sign ? ICmpInst::ICMP_SGT : ICmpInst::ICMP_UGT; break;