mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-16 00:33:10 +00:00
Only insert an AND when converting from BR_COND to BRCC if needed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25832 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ef6ffb17c7
commit
19c5c4cca9
@ -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…
x
Reference in New Issue
Block a user