diff options
-rw-r--r-- | lib/VMCore/Constants.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/VMCore/Constants.cpp b/lib/VMCore/Constants.cpp index 243365e9c6..93f8383876 100644 --- a/lib/VMCore/Constants.cpp +++ b/lib/VMCore/Constants.cpp @@ -1882,12 +1882,12 @@ Constant *ConstantExpr::getShuffleVector(Constant *V1, Constant *V2, } Constant *ConstantExpr::getZeroValueForNegationExpr(const Type *Ty) { - if ((const PackedType *PTy = dyn_cast<PackedType>(Ty)) && - PTy->getElementType()->isFloatingPoint()) { - std::vector<Constant*> zeros(PTy->getNumElements(), - ConstantFP::get(PTy->getElementType(), -0.0)); - return ConstantPacked::get(PTy, zeros); - } + if (const PackedType *PTy = dyn_cast<PackedType>(Ty)) + if (PTy->getElementType()->isFloatingPoint()) { + std::vector<Constant*> zeros(PTy->getNumElements(), + ConstantFP::get(PTy->getElementType(),-0.0)); + return ConstantPacked::get(PTy, zeros); + } if (Ty->isFloatingPoint()) return ConstantFP::get(Ty, -0.0); |