DAGCombiner: Partially revert r192795, getNOT was fixed not to create illegal constants.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194959 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2013-11-17 10:40:03 +00:00
parent e5a694ab57
commit d5ae5b0186
2 changed files with 3 additions and 1 deletions

View File

@ -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());

View File

@ -178,4 +178,6 @@ define i32 @PR17487(i1 %tobool) {
; X64-LABEL: PR17487:
; X64: andn
; X32-LABEL: PR17487:
; X32: andn
}