Skip to content

Commit 49fe8cd

Browse files
committed
[IR] Remove ConstantFP::getZeroValueForNegation.
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
1 parent 988d84a commit 49fe8cd

File tree

2 files changed

+0
-12
lines changed

2 files changed

+0
-12
lines changed

llvm/include/llvm/IR/Constants.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -269,11 +269,6 @@ class ConstantFP final : public ConstantData {
269269
public:
270270
ConstantFP(const ConstantFP &) = delete;
271271

272-
/// Floating point negation must be implemented with f(x) = -0.0 - x. This
273-
/// method returns the negative zero constant for floating point or vector
274-
/// floating point types; for all other types, it returns the null value.
275-
static Constant *getZeroValueForNegation(Type *Ty);
276-
277272
/// This returns a ConstantFP, or a vector containing a splat of a ConstantFP,
278273
/// for the specified value in the specified type. This should only be used
279274
/// for simple constant values like 2.0/1.0 etc, that are known-valid both as

llvm/lib/IR/Constants.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,13 +1009,6 @@ Constant *ConstantFP::getZero(Type *Ty, bool Negative) {
10091009
return C;
10101010
}
10111011

1012-
Constant *ConstantFP::getZeroValueForNegation(Type *Ty) {
1013-
if (Ty->isFPOrFPVectorTy())
1014-
return getNegativeZero(Ty);
1015-
1016-
return Constant::getNullValue(Ty);
1017-
}
1018-
10191012

10201013
// ConstantFP accessors.
10211014
ConstantFP* ConstantFP::get(LLVMContext &Context, const APFloat& V) {

0 commit comments

Comments
 (0)