[llvm] r194959 - DAGCombiner: Partially revert r192795, getNOT was fixed not to create illegal constants.

Benjamin Kramer benny.kra at googlemail.com
Sun Nov 17 02:40:03 PST 2013


Author: d0k
Date: Sun Nov 17 04:40:03 2013
New Revision: 194959

URL: http://llvm.org/viewvc/llvm-project?rev=194959&view=rev
Log:
DAGCombiner: Partially revert r192795, getNOT was fixed not to create illegal constants.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    llvm/trunk/test/CodeGen/X86/xor.ll

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp?rev=194959&r1=194958&r2=194959&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/DAGCombiner.cpp Sun Nov 17 04:40:03 2013
@@ -3576,7 +3576,7 @@ SDValue DAGCombiner::visitXOR(SDNode *N)
   }
   // fold (xor (and x, y), y) -> (and (not x), y)
   if (N0.getOpcode() == ISD::AND && N0.getNode()->hasOneUse() &&
-      N0->getOperand(1) == N1 && isTypeLegal(VT.getScalarType())) {
+      N0->getOperand(1) == N1) {
     SDValue X = N0->getOperand(0);
     SDValue NotX = DAG.getNOT(SDLoc(X), X, VT);
     AddToWorkList(NotX.getNode());

Modified: llvm/trunk/test/CodeGen/X86/xor.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/xor.ll?rev=194959&r1=194958&r2=194959&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/xor.ll (original)
+++ llvm/trunk/test/CodeGen/X86/xor.ll Sun Nov 17 04:40:03 2013
@@ -178,4 +178,6 @@ define i32 @PR17487(i1 %tobool) {
 
 ; X64-LABEL: PR17487:
 ; X64: andn
+; X32-LABEL: PR17487:
+; X32: andn
 }





More information about the llvm-commits mailing list