aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2012-02-06 21:56:39 +0000
committerChris Lattner <sabre@nondot.org>2012-02-06 21:56:39 +0000
commit7302d80490feabfc8a01bee0fa698aab55169544 (patch)
treea2e302de0cd9bbed2d37ef67132f6f43ba8587e0 /include
parent705f4813afb13ed850386cbb4b56688abb6412ab (diff)
downloadexternal_llvm-7302d80490feabfc8a01bee0fa698aab55169544.tar.gz
external_llvm-7302d80490feabfc8a01bee0fa698aab55169544.tar.bz2
external_llvm-7302d80490feabfc8a01bee0fa698aab55169544.zip
Remove some dead code and tidy things up now that vectors use ConstantDataVector
instead of always using ConstantVector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149912 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Support/PatternMatch.h23
1 files changed, 1 insertions, 22 deletions
diff --git a/include/llvm/Support/PatternMatch.h b/include/llvm/Support/PatternMatch.h
index 221fa8b3eb..8c68fcb691 100644
--- a/include/llvm/Support/PatternMatch.h
+++ b/include/llvm/Support/PatternMatch.h
@@ -98,13 +98,6 @@ struct apint_match {
Res = &CI->getValue();
return true;
}
- // FIXME: Remove this.
- if (ConstantVector *CV = dyn_cast<ConstantVector>(V))
- if (ConstantInt *CI =
- dyn_cast_or_null<ConstantInt>(CV->getSplatValue())) {
- Res = &CI->getValue();
- return true;
- }
if (ConstantDataVector *CV = dyn_cast<ConstantDataVector>(V))
if (ConstantInt *CI =
dyn_cast_or_null<ConstantInt>(CV->getSplatValue())) {
@@ -151,10 +144,6 @@ struct cst_pred_ty : public Predicate {
bool match(ITy *V) {
if (const ConstantInt *CI = dyn_cast<ConstantInt>(V))
return this->isValue(CI->getValue());
- // FIXME: Remove this.
- if (const ConstantVector *CV = dyn_cast<ConstantVector>(V))
- if (ConstantInt *CI = dyn_cast_or_null<ConstantInt>(CV->getSplatValue()))
- return this->isValue(CI->getValue());
if (const ConstantDataVector *CV = dyn_cast<ConstantDataVector>(V))
if (ConstantInt *CI = dyn_cast_or_null<ConstantInt>(CV->getSplatValue()))
return this->isValue(CI->getValue());
@@ -176,14 +165,6 @@ struct api_pred_ty : public Predicate {
return true;
}
- // FIXME: remove.
- if (const ConstantVector *CV = dyn_cast<ConstantVector>(V))
- if (ConstantInt *CI = dyn_cast_or_null<ConstantInt>(CV->getSplatValue()))
- if (this->isValue(CI->getValue())) {
- Res = &CI->getValue();
- return true;
- }
-
if (const ConstantDataVector *CV = dyn_cast<ConstantDataVector>(V))
if (ConstantInt *CI = dyn_cast_or_null<ConstantInt>(CV->getSplatValue()))
if (this->isValue(CI->getValue())) {
@@ -632,9 +613,7 @@ struct not_match {
}
private:
bool matchIfNot(Value *LHS, Value *RHS) {
- return (isa<ConstantInt>(RHS) || isa<ConstantDataVector>(RHS) ||
- // FIXME: Remove CV.
- isa<ConstantVector>(RHS)) &&
+ return (isa<ConstantInt>(RHS) || isa<ConstantDataVector>(RHS)) &&
cast<Constant>(RHS)->isAllOnesValue() &&
L.match(LHS);
}