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 | f4c8d3cea9e63b207bd420b827e43cb8fc863387 (patch) | |
| tree | 3dc87969f575ff8af633568590a38d646dc0efee /llvm/lib/Transforms | |
| parent | 9b6a1789e5f9d23b648d0c0ac07b38758a954cd7 (diff) | |
| download | bcm5719-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.cpp | 12 |
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; } |

