mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-13 23:26:25 +00:00
Teach legalize to promote SetCC results.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19657 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -917,6 +917,14 @@ SDOperand SelectionDAGLegalize::PromoteOp(SDOperand Op) {
|
|||||||
Result = DAG.getNode(ISD::FP_EXTEND, NVT, Op);
|
Result = DAG.getNode(ISD::FP_EXTEND, NVT, Op);
|
||||||
assert(isa<ConstantFPSDNode>(Result) && "Didn't constant fold fp_extend?");
|
assert(isa<ConstantFPSDNode>(Result) && "Didn't constant fold fp_extend?");
|
||||||
break;
|
break;
|
||||||
|
case ISD::SETCC:
|
||||||
|
assert(getTypeAction(TLI.getSetCCResultTy()) == Legal &&
|
||||||
|
"SetCC type is not legal??");
|
||||||
|
Result = DAG.getSetCC(cast<SetCCSDNode>(Node)->getCondition(),
|
||||||
|
TLI.getSetCCResultTy(), Node->getOperand(0),
|
||||||
|
Node->getOperand(1));
|
||||||
|
Result = LegalizeOp(Result);
|
||||||
|
break;
|
||||||
|
|
||||||
case ISD::TRUNCATE:
|
case ISD::TRUNCATE:
|
||||||
switch (getTypeAction(Node->getOperand(0).getValueType())) {
|
switch (getTypeAction(Node->getOperand(0).getValueType())) {
|
||||||
|
Reference in New Issue
Block a user