aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/InstructionSimplify.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2019-04-25 02:30:17 +0000
committerPhilip Reames <listmail@philipreames.com>2019-04-25 02:30:17 +0000
commit88cd69b56fabd7197c49400b7e54d632b968dd82 (patch)
treec529b3d9793f838bf7907dc282e263ad6f510df1 /llvm/lib/Analysis/InstructionSimplify.cpp
parent07161d6de353c2363cc721ba8940163146da82a5 (diff)
downloadllvm-88cd69b56fabd7197c49400b7e54d632b968dd82.zip
llvm-88cd69b56fabd7197c49400b7e54d632b968dd82.tar.gz
llvm-88cd69b56fabd7197c49400b7e54d632b968dd82.tar.bz2
Consolidate existing utilities for interpreting vector predicate maskes [NFC]
llvm-svn: 359163
Diffstat (limited to 'llvm/lib/Analysis/InstructionSimplify.cpp')
-rw-r--r--llvm/lib/Analysis/InstructionSimplify.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/llvm/lib/Analysis/InstructionSimplify.cpp b/llvm/lib/Analysis/InstructionSimplify.cpp
index 87e0df2..4c358a05 100644
--- a/llvm/lib/Analysis/InstructionSimplify.cpp
+++ b/llvm/lib/Analysis/InstructionSimplify.cpp
@@ -4635,22 +4635,6 @@ static Value *SimplifyRelativeLoad(Constant *Ptr, Constant *Offset,
return ConstantExpr::getBitCast(LoadedLHSPtr, Int8PtrTy);
}
-static bool maskIsAllZeroOrUndef(Value *Mask) {
- auto *ConstMask = dyn_cast<Constant>(Mask);
- if (!ConstMask)
- return false;
- if (ConstMask->isNullValue() || isa<UndefValue>(ConstMask))
- return true;
- for (unsigned I = 0, E = ConstMask->getType()->getVectorNumElements(); I != E;
- ++I) {
- if (auto *MaskElt = ConstMask->getAggregateElement(I))
- if (MaskElt->isNullValue() || isa<UndefValue>(MaskElt))
- continue;
- return false;
- }
- return true;
-}
-
static Value *simplifyUnaryIntrinsic(Function *F, Value *Op0,
const SimplifyQuery &Q) {
// Idempotent functions return the same result when called repeatedly.