diff options
author | Chris Lattner <sabre@nondot.org> | 2008-11-16 03:54:57 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-11-16 03:54:57 +0000 |
commit | 86a6e458dcfdb52b4e027b5e3ae30b42760326a4 (patch) | |
tree | 74a0210c59fb2649e4d673462f3c7f5693fa9f6c /lib | |
parent | 827283f6af8fbf9ea33014361afa49778828c4c1 (diff) | |
download | external_llvm-86a6e458dcfdb52b4e027b5e3ae30b42760326a4.zip external_llvm-86a6e458dcfdb52b4e027b5e3ae30b42760326a4.tar.gz external_llvm-86a6e458dcfdb52b4e027b5e3ae30b42760326a4.tar.bz2 |
if we're going to use a macro, use it maximally. no functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59380 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index c712363..16607bd 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -4359,56 +4359,56 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) { // (A & (C0?-1:0)) | (B & ~(C0?-1:0)) -> C0 ? A : B, and commuted variants Value *C0 = 0; - if (match(A, m_Select(m_Value(C0), m_ConstantInt(-1), m_ConstantInt(0)))) { + if (match(A, SELECT_MATCH(C0, -1, 0))) { Value *C1 = 0; if (match(D, m_Not(SELECT_MATCH(C1, -1, 0))) && C1 == C0) return SelectInst::Create(C1, C, B); if (match(B, m_Not(SELECT_MATCH(C1, -1, 0))) && C1 == C0) return SelectInst::Create(C1, C, D); } - if (match(B, m_Select(m_Value(C0), m_ConstantInt(-1), m_ConstantInt(0)))) { + if (match(B, SELECT_MATCH(C0, -1, 0))) { Value *C1 = 0; if (match(C, m_Not(SELECT_MATCH(C1, -1, 0))) && C1 == C0) return SelectInst::Create(C1, A, D); if (match(A, m_Not(SELECT_MATCH(C1, -1, 0))) && C1 == C0) return SelectInst::Create(C1, C, D); } - if (match(C, m_Select(m_Value(C0), m_ConstantInt(-1), m_ConstantInt(0)))) { + if (match(C, SELECT_MATCH(C0, -1, 0))) { Value *C1 = 0; if (match(D, m_Not(SELECT_MATCH(C1, -1, 0))) && C1 == C0) return SelectInst::Create(C1, A, B); if (match(B, m_Not(SELECT_MATCH(C1, -1, 0))) && C1 == C0) return SelectInst::Create(C1, A, D); } - if (match(D, m_Select(m_Value(C0), m_ConstantInt(-1), m_ConstantInt(0)))) { + if (match(D, SELECT_MATCH(C0, -1, 0))) { Value *C1 = 0; if (match(C, m_Not(SELECT_MATCH(C1, -1, 0))) && C1 == C0) return SelectInst::Create(C1, A, B); if (match(A, m_Not(SELECT_MATCH(C1, -1, 0))) && C1 == C0) return SelectInst::Create(C1, C, B); } - if (match(A, m_Select(m_Value(C0), m_ConstantInt(0), m_ConstantInt(-1)))) { + if (match(A, SELECT_MATCH(C0, 0, -1))) { Value *C1 = 0; if (match(D, m_Not(SELECT_MATCH(C1, 0, -1))) && C1 == C0) return SelectInst::Create(C1, B, C); if (match(B, m_Not(SELECT_MATCH(C1, 0, -1))) && C1 == C0) return SelectInst::Create(C1, D, C); } - if (match(B, m_Select(m_Value(C0), m_ConstantInt(0), m_ConstantInt(-1)))) { + if (match(B, SELECT_MATCH(C0, 0, -1))) { Value *C1 = 0; if (match(C, m_Not(SELECT_MATCH(C1, 0, -1))) && C1 == C0) return SelectInst::Create(C1, D, A); if (match(A, m_Not(SELECT_MATCH(C1, 0, -1))) && C1 == C0) return SelectInst::Create(C1, D, C); } - if (match(C, m_Select(m_Value(C0), m_ConstantInt(0), m_ConstantInt(-1)))) { + if (match(C, SELECT_MATCH(C0, 0, -1))) { Value *C1 = 0; if (match(D, m_Not(SELECT_MATCH(C1, 0, -1))) && C1 == C0) return SelectInst::Create(C1, B, A); if (match(B, m_Not(SELECT_MATCH(C1, 0, -1))) && C1 == C0) return SelectInst::Create(C1, D, A); } - if (match(D, m_Select(m_Value(C0), m_ConstantInt(0), m_ConstantInt(-1)))) { + if (match(D, SELECT_MATCH(C0, 0, -1))) { Value *C1 = 0; if (match(C, m_Not(SELECT_MATCH(C1, 0, -1))) && C1 == C0) return SelectInst::Create(C1, B, A); |