diff options
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCLowerMASSVEntries.cpp')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCLowerMASSVEntries.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCLowerMASSVEntries.cpp b/llvm/lib/Target/PowerPC/PPCLowerMASSVEntries.cpp index 2b0e604e0ccd..27b2c9a628d0 100644 --- a/llvm/lib/Target/PowerPC/PPCLowerMASSVEntries.cpp +++ b/llvm/lib/Target/PowerPC/PPCLowerMASSVEntries.cpp @@ -16,6 +16,7 @@ #include "PPC.h" #include "PPCSubtarget.h" #include "PPCTargetMachine.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/CodeGen/TargetPassConfig.h" #include "llvm/IR/Instructions.h" @@ -64,8 +65,7 @@ private: /// Checks if the specified function name represents an entry in the MASSV /// library. bool PPCLowerMASSVEntries::isMASSVFunc(StringRef Name) { - auto Iter = std::find(std::begin(MASSVFuncs), std::end(MASSVFuncs), Name); - return Iter != std::end(MASSVFuncs); + return llvm::is_contained(MASSVFuncs, Name); } // FIXME: @@ -105,7 +105,7 @@ bool PPCLowerMASSVEntries::handlePowSpecialCases(CallInst *CI, Function &Func, return false; if (Constant *Exp = dyn_cast<Constant>(CI->getArgOperand(1))) - if (ConstantFP *CFP = dyn_cast<ConstantFP>(Exp->getSplatValue())) { + if (ConstantFP *CFP = dyn_cast_or_null<ConstantFP>(Exp->getSplatValue())) { // If the argument is 0.75 or 0.25 it is cheaper to turn it into pow // intrinsic so that it could be optimzed as sequence of sqrt's. if (!CI->hasNoInfs() || !CI->hasApproxFunc()) |
