mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Don't try to zExt just to check if an integer constant is zero, it might
not fit in a i64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154364 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -4431,9 +4431,9 @@ static bool isTruncateOf(SelectionDAG &DAG, SDValue N, SDValue &Op,
|
||||
|
||||
ConstantSDNode *COp0 = dyn_cast<ConstantSDNode>(Op0);
|
||||
ConstantSDNode *COp1 = dyn_cast<ConstantSDNode>(Op1);
|
||||
if (COp0 && COp0->getZExtValue() == 0)
|
||||
if (COp0 && COp0->isNullValue())
|
||||
Op = Op1;
|
||||
else if (COp1 && COp1->getZExtValue() == 0)
|
||||
else if (COp1 && COp1->isNullValue())
|
||||
Op = Op0;
|
||||
else
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user