[llvm-commits] [llvm] r59381 - /llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Chris Lattner
sabre at nondot.org
Sat Nov 15 19:56:25 PST 2008
Author: lattner
Date: Sat Nov 15 21:56:24 2008
New Revision: 59381
URL: http://llvm.org/viewvc/llvm-project?rev=59381&view=rev
Log:
rearrange some code, no functionality change.
Modified:
llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp?rev=59381&r1=59380&r2=59381&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/InstructionCombining.cpp Sat Nov 15 21:56:24 2008
@@ -4366,27 +4366,6 @@
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 @@
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 @@
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 @@
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)
More information about the llvm-commits
mailing list