mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 05:29:24 +00:00
don't insert an and node if it isn't needed here, this can prevent folding
of lowered target nodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25804 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c6fd6cd65c
commit
0e753d617b
@ -1284,7 +1284,9 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
|
||||
} else {
|
||||
// Make sure the condition is either zero or one. It may have been
|
||||
// promoted from something else.
|
||||
Tmp1 = DAG.getZeroExtendInReg(Tmp1, MVT::i1);
|
||||
unsigned NumBits = MVT::getSizeInBits(Tmp1.getValueType());
|
||||
if (!TLI.MaskedValueIsZero(Tmp1, (~0ULL >> (64-NumBits))^1))
|
||||
Tmp1 = DAG.getZeroExtendInReg(Tmp1, MVT::i1);
|
||||
Result = DAG.getSelectCC(Tmp1,
|
||||
DAG.getConstant(0, Tmp1.getValueType()),
|
||||
Tmp2, Tmp3, ISD::SETNE);
|
||||
|
Loading…
Reference in New Issue
Block a user