summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-09 01:14:06 +0000
committerChris Lattner <sabre@nondot.org>2010-02-09 01:14:06 +0000
commitf4c8d3cea9e63b207bd420b827e43cb8fc863387 (patch)
tree3dc87969f575ff8af633568590a38d646dc0efee /llvm/lib/Transforms
parent9b6a1789e5f9d23b648d0c0ac07b38758a954cd7 (diff)
downloadbcm5719-llvm-f4c8d3cea9e63b207bd420b827e43cb8fc863387.tar.gz
bcm5719-llvm-f4c8d3cea9e63b207bd420b827e43cb8fc863387.zip
simplify this code, duh.
llvm-svn: 95643
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
index 9de73bada7e..1f86a8ec6ef 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
@@ -1147,19 +1147,15 @@ static Instruction *MatchSelectFromAndOr(Value *A, Value *B,
return 0;
// ((cond?-1:0)&C) | (B&(cond?0:-1)) -> cond ? C : B.
- if (match(D, m_Not(m_SExt(m_Specific(Cond)))) &&
- Cond->getType()->isInteger(1))
+ if (match(D, m_Not(m_SExt(m_Specific(Cond)))))
return SelectInst::Create(Cond, C, B);
- if (match(D, m_SExt(m_Not(m_Specific(Cond)))) &&
- Cond->getType()->isInteger(1))
+ if (match(D, m_SExt(m_Not(m_Specific(Cond)))))
return SelectInst::Create(Cond, C, B);
// ((cond?-1:0)&C) | ((cond?0:-1)&D) -> cond ? C : D.
- if (match(B, m_Not(m_SExt(m_Specific(Cond)))) &&
- Cond->getType()->isInteger(1))
+ if (match(B, m_Not(m_SExt(m_Specific(Cond)))))
return SelectInst::Create(Cond, C, D);
- if (match(B, m_SExt(m_Not(m_Specific(Cond)))) &&
- Cond->getType()->isInteger(1))
+ if (match(B, m_SExt(m_Not(m_Specific(Cond)))))
return SelectInst::Create(Cond, C, D);
return 0;
}
OpenPOWER on IntegriCloud