diff --git a/llvm/include/llvm/IR/Constants.h b/llvm/include/llvm/IR/Constants.h --- a/llvm/include/llvm/IR/Constants.h +++ b/llvm/include/llvm/IR/Constants.h @@ -269,11 +269,6 @@ public: ConstantFP(const ConstantFP &) = delete; - /// Floating point negation must be implemented with f(x) = -0.0 - x. This - /// method returns the negative zero constant for floating point or vector - /// floating point types; for all other types, it returns the null value. - static Constant *getZeroValueForNegation(Type *Ty); - /// This returns a ConstantFP, or a vector containing a splat of a ConstantFP, /// for the specified value in the specified type. This should only be used /// for simple constant values like 2.0/1.0 etc, that are known-valid both as diff --git a/llvm/lib/IR/Constants.cpp b/llvm/lib/IR/Constants.cpp --- a/llvm/lib/IR/Constants.cpp +++ b/llvm/lib/IR/Constants.cpp @@ -1009,13 +1009,6 @@ return C; } -Constant *ConstantFP::getZeroValueForNegation(Type *Ty) { - if (Ty->isFPOrFPVectorTy()) - return getNegativeZero(Ty); - - return Constant::getNullValue(Ty); -} - // ConstantFP accessors. ConstantFP* ConstantFP::get(LLVMContext &Context, const APFloat& V) {