[llvm-commits] [llvm] r137853 - /llvm/trunk/lib/Analysis/InstructionSimplify.cpp
Eli Friedman
eli.friedman at gmail.com
Wed Aug 17 12:31:49 PDT 2011
Author: efriedma
Date: Wed Aug 17 14:31:49 2011
New Revision: 137853
URL: http://llvm.org/viewvc/llvm-project?rev=137853&view=rev
Log:
Revert r137781; I agree with Duncan's comment that the situation in question is clearly impossible given the current structure of the code.
Modified:
llvm/trunk/lib/Analysis/InstructionSimplify.cpp
Modified: llvm/trunk/lib/Analysis/InstructionSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstructionSimplify.cpp?rev=137853&r1=137852&r2=137853&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InstructionSimplify.cpp (original)
+++ llvm/trunk/lib/Analysis/InstructionSimplify.cpp Wed Aug 17 14:31:49 2011
@@ -1348,11 +1348,6 @@
std::swap(Op0, Op1);
}
- // A ^ A = 0
- // Do this first so that we catch the undef ^ undef "idiom".
- if (Op0 == Op1)
- return Constant::getNullValue(Op0->getType());
-
// A ^ undef -> undef
if (match(Op1, m_Undef()))
return Op1;
@@ -1361,6 +1356,10 @@
if (match(Op1, m_Zero()))
return Op0;
+ // A ^ A = 0
+ if (Op0 == Op1)
+ return Constant::getNullValue(Op0->getType());
+
// A ^ ~A = ~A ^ A = -1
if (match(Op0, m_Not(m_Specific(Op1))) ||
match(Op1, m_Not(m_Specific(Op0))))
More information about the llvm-commits
mailing list