mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-27 14:07:32 +00:00
Only insert an AND when converting from BR_COND to BRCC if needed.
llvm-svn: 25832
This commit is contained in:
parent
49467b6b5b
commit
d33e8efd56
@ -703,7 +703,9 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
|
||||
} else {
|
||||
// Make sure the condition is either zero or one. It may have been
|
||||
// promoted from something else.
|
||||
Tmp2 = DAG.getZeroExtendInReg(Tmp2, MVT::i1);
|
||||
unsigned NumBits = MVT::getSizeInBits(Tmp2.getValueType());
|
||||
if (!TLI.MaskedValueIsZero(Tmp2, (~0ULL >> (64-NumBits))^1))
|
||||
Tmp2 = DAG.getZeroExtendInReg(Tmp2, MVT::i1);
|
||||
|
||||
Result = DAG.getNode(ISD::BR_CC, MVT::Other, Tmp1,
|
||||
DAG.getCondCode(ISD::SETNE), Tmp2,
|
||||
|
Loading…
Reference in New Issue
Block a user