Skip to content

Commit

Permalink
[IR] Remove ConstantFP::getZeroValueForNegation.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
topperc committed Apr 4, 2023
1 parent 988d84a commit 49fe8cd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
5 changes: 0 additions & 5 deletions llvm/include/llvm/IR/Constants.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 0 additions & 7 deletions llvm/lib/IR/Constants.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 49fe8cd

Please sign in to comment.