mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-25 00:33:15 +00:00
Zero is cheaper than sign extend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19675 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
477c931852
commit
d5d5682512
@ -793,7 +793,7 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
|
||||
case ISD::SIGN_EXTEND:
|
||||
Result = PromoteOp(Node->getOperand(0));
|
||||
// NOTE: Any extend would work here...
|
||||
Result = DAG.getNode(ISD::SIGN_EXTEND, Op.getValueType(), Result);
|
||||
Result = DAG.getNode(ISD::ZERO_EXTEND, Op.getValueType(), Result);
|
||||
Result = DAG.getNode(ISD::SIGN_EXTEND_INREG, Result.getValueType(),
|
||||
Result, Node->getOperand(0).getValueType());
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user