[IR] Remove ConstantFP::getZeroValueForNegation.
authorCraig Topper <craig.topper@sifive.com>
Tue, 4 Apr 2023 16:24:29 +0000 (09:24 -0700)
committerCraig Topper <craig.topper@sifive.com>
Tue, 4 Apr 2023 16:24:29 +0000 (09:24 -0700)
This was mostly used for integers which was fixed in D147492.

The only FP usage was removed in D147497.

Reviewed By: nikic

Differential Revision: https://reviews.llvm.org/D147501

llvm/include/llvm/IR/Constants.h
llvm/lib/IR/Constants.cpp

index baa4bac..94940c8 100644 (file)
@@ -269,11 +269,6 @@ class ConstantFP final : public ConstantData {
 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
index 9e26d6c..398ceda 100644 (file)
@@ -1009,13 +1009,6 @@ Constant *ConstantFP::getZero(Type *Ty, bool Negative) {
   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) {