diff options
| author | Chris Lattner <sabre@nondot.org> | 2007-07-23 17:10:17 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2007-07-23 17:10:17 +0000 |
| commit | 4512cd2cab61fb4b199b7d6bb0ecd6d34f6e5578 (patch) | |
| tree | 193349d968cb9cf68ab3a8cfe3314091cc0ac8e2 /llvm/lib/Transforms | |
| parent | 54f4d2bd57ed5a1d96fbecbee6d4781a3be238fc (diff) | |
| download | bcm5719-llvm-4512cd2cab61fb4b199b7d6bb0ecd6d34f6e5578.tar.gz bcm5719-llvm-4512cd2cab61fb4b199b7d6bb0ecd6d34f6e5578.zip | |
completely remove a transformation that is unsafe in the face of
undefs.
llvm-svn: 40439
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/InstructionCombining.cpp | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp index 564b98165df..36e1fc2fe95 100644 --- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp @@ -3870,42 +3870,6 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) { InsertNewInstBefore(BinaryOperator::createOr(V2, V3, "tmp"), I); return BinaryOperator::createAnd(V1, Or); } - - // (V1 & V3)|(V2 & ~V3) -> ((V1 ^ V2) & V3) ^ V2 - // Disable this transformations temporarily. This causes - // mis-compilation when V2 is undefined. - if (0 && isOnlyUse(Op0) && isOnlyUse(Op1)) { - // Try all combination of terms to find V3 and ~V3. - if (A->hasOneUse() && match(A, m_Not(m_Value(V3)))) { - if (V3 == B) - V1 = D, V2 = C; - else if (V3 == D) - V1 = B, V2 = C; - } - if (B->hasOneUse() && match(B, m_Not(m_Value(V3)))) { - if (V3 == A) - V1 = C, V2 = D; - else if (V3 == C) - V1 = A, V2 = D; - } - if (C->hasOneUse() && match(C, m_Not(m_Value(V3)))) { - if (V3 == B) - V1 = D, V2 = A; - else if (V3 == D) - V1 = B, V2 = A; - } - if (D->hasOneUse() && match(D, m_Not(m_Value(V3)))) { - if (V3 == A) - V1 = C, V2 = B; - else if (V3 == C) - V1 = A, V2 = B; - } - if (V1) { - A = InsertNewInstBefore(BinaryOperator::createXor(V1, V2, "tmp"), I); - A = InsertNewInstBefore(BinaryOperator::createAnd(A, V3, "tmp"), I); - return BinaryOperator::createXor(A, V2); - } - } } } |

