mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-21 06:30:16 +00:00
Make sure to legalize assert[zs]ext's operand correctly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23208 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5b3224fe7e
commit
08951a32fb
@ -456,14 +456,19 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
|
||||
assert(0 && "Do not know how to legalize this operator!");
|
||||
abort();
|
||||
case ISD::EntryToken:
|
||||
case ISD::AssertSext:
|
||||
case ISD::AssertZext:
|
||||
case ISD::FrameIndex:
|
||||
case ISD::GlobalAddress:
|
||||
case ISD::ExternalSymbol:
|
||||
case ISD::ConstantPool: // Nothing to do.
|
||||
assert(isTypeLegal(Node->getValueType(0)) && "This must be legal!");
|
||||
break;
|
||||
case ISD::AssertSext:
|
||||
case ISD::AssertZext:
|
||||
Tmp1 = LegalizeOp(Node->getOperand(0));
|
||||
if (Tmp1 != Node->getOperand(0))
|
||||
Result = DAG.getNode(Node->getOpcode(), Node->getValueType(0), Tmp1,
|
||||
Node->getOperand(1));
|
||||
break;
|
||||
case ISD::CopyFromReg:
|
||||
Tmp1 = LegalizeOp(Node->getOperand(0));
|
||||
if (Tmp1 != Node->getOperand(0))
|
||||
|
Loading…
x
Reference in New Issue
Block a user