diff options
author | Stuart Hastings <stuart@apple.com> | 2011-05-13 00:51:54 +0000 |
---|---|---|
committer | Stuart Hastings <stuart@apple.com> | 2011-05-13 00:51:54 +0000 |
commit | aa02c0847dbe6959aae9652ddd7ce727b54ba6af (patch) | |
tree | cdd992af2c3842fef4179e260b4894035449bbdf /llvm/lib/CodeGen/SelectionDAG | |
parent | 52b0ffd9c62645cb9bc3a16a5cf6d1f22febe22e (diff) | |
download | bcm5719-llvm-aa02c0847dbe6959aae9652ddd7ce727b54ba6af.tar.gz bcm5719-llvm-aa02c0847dbe6959aae9652ddd7ce727b54ba6af.zip |
Since I can't reproduce the failures from 131261, re-trying with a
simplified version. <rdar://problem/9298790>
llvm-svn: 131274
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index e2e6691ba7c..e140d671a8f 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -3535,9 +3535,13 @@ void SelectionDAGLegalize::ExpandNode(SDNode *Node, Tmp2.getOperand(0), Tmp2.getOperand(1), Node->getOperand(2)); } else { + // We test only the i1 bit. Skip the AND if UNDEF. + Tmp3 = (Tmp2.getOpcode() == ISD::UNDEF) ? Tmp2 : + DAG.getNode(ISD::AND, dl, Tmp2.getValueType(), Tmp2, + DAG.getConstant(1, Tmp2.getValueType())); Tmp1 = DAG.getNode(ISD::BR_CC, dl, MVT::Other, Tmp1, - DAG.getCondCode(ISD::SETNE), Tmp2, - DAG.getConstant(0, Tmp2.getValueType()), + DAG.getCondCode(ISD::SETNE), Tmp3, + DAG.getConstant(0, Tmp3.getValueType()), Node->getOperand(2)); } Results.push_back(Tmp1); |