mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-09 13:33:17 +00:00
Fix a bug where we would incorrectly do a sign ext instead of a zero ext
because we were checking the wrong thing. Thanks to andrew for pointing this out! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20554 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
572668aa38
commit
ee639f1760
@ -961,7 +961,7 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,SDOperand N1,
|
||||
// Extending a constant? Just return the constant.
|
||||
if (ConstantSDNode *N1C = dyn_cast<ConstantSDNode>(N1.Val)) {
|
||||
SDOperand Tmp = getNode(ISD::TRUNCATE, EVT, N1);
|
||||
if (N1.getOpcode() == ISD::ZERO_EXTEND_INREG)
|
||||
if (Opcode == ISD::ZERO_EXTEND_INREG)
|
||||
return getNode(ISD::ZERO_EXTEND, VT, Tmp);
|
||||
else
|
||||
return getNode(ISD::SIGN_EXTEND, VT, Tmp);
|
||||
|
Loading…
x
Reference in New Issue
Block a user