diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-09 01:14:06 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-09 01:14:06 +0000 |
commit | e576f292ee5f7af40489a68fa626d53a14e46a10 (patch) | |
tree | d2186d7490e644c48439d87abee9cb62faf03b49 | |
parent | e538db4fb0ec30500da721a2a698946fa36db1a8 (diff) |
simplify this code, duh.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95643 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineAndOrXor.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp index 9de73bada7..1f86a8ec6e 100644 --- a/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp +++ b/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; } |