mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-27 14:34:58 +00:00
Legalize FSQRT, FSIN, FCOS nodes, patch contributed by Morten Ofstad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21606 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7f64464ff1
commit
da6ba87d23
@ -990,6 +990,9 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
|
||||
// Unary operators
|
||||
case ISD::FABS:
|
||||
case ISD::FNEG:
|
||||
case ISD::FSQRT:
|
||||
case ISD::FSIN:
|
||||
case ISD::FCOS:
|
||||
Tmp1 = LegalizeOp(Node->getOperand(0));
|
||||
switch (TLI.getOperationAction(Node->getOpcode(), Node->getValueType(0))) {
|
||||
case TargetLowering::Legal:
|
||||
@ -1335,6 +1338,16 @@ SDOperand SelectionDAGLegalize::PromoteOp(SDOperand Op) {
|
||||
// precision, and these operations don't modify precision at all.
|
||||
break;
|
||||
|
||||
case ISD::FSQRT:
|
||||
case ISD::FSIN:
|
||||
case ISD::FCOS:
|
||||
Tmp1 = PromoteOp(Node->getOperand(0));
|
||||
assert(Tmp1.getValueType() == NVT);
|
||||
Result = DAG.getNode(Node->getOpcode(), NVT, Tmp1);
|
||||
if(NoExcessFPPrecision)
|
||||
Result = DAG.getNode(ISD::FP_ROUND_INREG, NVT, Result, VT);
|
||||
break;
|
||||
|
||||
case ISD::AND:
|
||||
case ISD::OR:
|
||||
case ISD::XOR:
|
||||
|
Loading…
x
Reference in New Issue
Block a user