summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-11-16 03:56:24 +0000
committerChris Lattner <sabre@nondot.org>2008-11-16 03:56:24 +0000
commit68d2da2a19319ac4123c130c4f6b3cb53fe0f3a8 (patch)
tree08bebe647bb8e215cf4c117f72bd8ddabcbb10ec /llvm/lib
parente02c7c7ad2b0569f3ba62dd35a9a7864155d9229 (diff)
downloadbcm5719-llvm-68d2da2a19319ac4123c130c4f6b3cb53fe0f3a8.tar.gz
bcm5719-llvm-68d2da2a19319ac4123c130c4f6b3cb53fe0f3a8.zip
rearrange some code, no functionality change.
llvm-svn: 59381
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 16607bd62d5..0ae4ecfadd1 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -4366,27 +4366,6 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) {
if (match(B, m_Not(SELECT_MATCH(C1, -1, 0))) && C1 == C0)
return SelectInst::Create(C1, C, D);
}
- 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, 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, 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, SELECT_MATCH(C0, 0, -1))) {
Value *C1 = 0;
if (match(D, m_Not(SELECT_MATCH(C1, 0, -1))) && C1 == C0)
@@ -4394,6 +4373,13 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) {
if (match(B, m_Not(SELECT_MATCH(C1, 0, -1))) && C1 == C0)
return SelectInst::Create(C1, D, C);
}
+ 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(B, SELECT_MATCH(C0, 0, -1))) {
Value *C1 = 0;
if (match(C, m_Not(SELECT_MATCH(C1, 0, -1))) && C1 == C0)
@@ -4401,6 +4387,13 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) {
if (match(A, m_Not(SELECT_MATCH(C1, 0, -1))) && C1 == C0)
return SelectInst::Create(C1, D, C);
}
+ 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(C, SELECT_MATCH(C0, 0, -1))) {
Value *C1 = 0;
if (match(D, m_Not(SELECT_MATCH(C1, 0, -1))) && C1 == C0)
@@ -4408,6 +4401,13 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) {
if (match(B, m_Not(SELECT_MATCH(C1, 0, -1))) && C1 == C0)
return SelectInst::Create(C1, D, A);
}
+ 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(D, SELECT_MATCH(C0, 0, -1))) {
Value *C1 = 0;
if (match(C, m_Not(SELECT_MATCH(C1, 0, -1))) && C1 == C0)
OpenPOWER on IntegriCloud