llvm2alive: marke sqrt's input as well defined
this is required by -partially-inline-libcalls
see LLVM's test: Transforms/PartiallyInlineLibCalls/X86/good-prototype.ll
MODIFY
ir/instr.cpp
ir/instr.cpp
@@ -2466,6 +2466,8 @@ StateValue Assume::toSMT(State &s) const {
}
expr Assume::getTypeConstraints(const Function &f) const {
+ if (kind == WellDefined)
+ return true;
return cond->getType().enforceIntType();
}

MODIFY
llvm_util/known_fns.cpp
llvm_util/known_fns.cpp
@@ -150,6 +150,7 @@ known_call(llvm::CallInst &i, const llvm::TargetLibraryInfo &TLI,
case llvm::LibFunc_sqrt:
case llvm::LibFunc_sqrtf:
+ BB.addInstr(make_unique<Assume>(*args[0], Assume::WellDefined));
RETURN_KNOWN(
make_unique<UnaryOp>(*ty, value_name(i), *args[0], UnaryOp::Sqrt));

llvm2alive: marke sqrt's input as well defined
this is required by -partially-inline-libcalls
see LLVM's test: Transforms/PartiallyInlineLibCalls/X86/good-prototype.ll