Commit 1a5b3848 authored by Tanya Lattner's avatar Tanya Lattner
Browse files

Merging from mainline

Fix a dag combiner bug exposed by my recent instcombine patch.  This fixes
CodeGen/Generic/2006-11-10-DAGCombineMiscompile.ll and PPC gsm/toast.

llvm-svn: 31646
parent 0c669f27
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1608,7 +1608,7 @@ SDOperand DAGCombiner::visitXOR(SDNode *N) {
    abort();
  }
  // fold !(x or y) -> (!x and !y) iff x or y are setcc
  if (N1C && N1C->getValue() == 1 && 
  if (N1C && N1C->getValue() == 1 && VT == MVT::i1 &&
      (N0.getOpcode() == ISD::OR || N0.getOpcode() == ISD::AND)) {
    SDOperand LHS = N0.getOperand(0), RHS = N0.getOperand(1);
    if (isOneUseSetCC(RHS) || isOneUseSetCC(LHS)) {