forked from OSchip/llvm-project
now that libcalls don't suck, we can remove this hack
llvm-svn: 26164
This commit is contained in:
parent
e01ff337ee
commit
1784a9d267
|
@ -1098,9 +1098,7 @@ void SelectionDAGLowering::visitCall(CallInst &I) {
|
||||||
} else if (Name[0] == 's' && (Name == "sin" || Name == "sinf")) {
|
} else if (Name[0] == 's' && (Name == "sin" || Name == "sinf")) {
|
||||||
if (I.getNumOperands() == 2 && // Basic sanity checks.
|
if (I.getNumOperands() == 2 && // Basic sanity checks.
|
||||||
I.getOperand(1)->getType()->isFloatingPoint() &&
|
I.getOperand(1)->getType()->isFloatingPoint() &&
|
||||||
I.getType() == I.getOperand(1)->getType() &&
|
I.getType() == I.getOperand(1)->getType()) {
|
||||||
TLI.isOperationLegal(ISD::FSIN,
|
|
||||||
TLI.getValueType(I.getOperand(1)->getType()))) {
|
|
||||||
SDOperand Tmp = getValue(I.getOperand(1));
|
SDOperand Tmp = getValue(I.getOperand(1));
|
||||||
setValue(&I, DAG.getNode(ISD::FSIN, Tmp.getValueType(), Tmp));
|
setValue(&I, DAG.getNode(ISD::FSIN, Tmp.getValueType(), Tmp));
|
||||||
return;
|
return;
|
||||||
|
@ -1108,9 +1106,7 @@ void SelectionDAGLowering::visitCall(CallInst &I) {
|
||||||
} else if (Name[0] == 'c' && (Name == "cos" || Name == "cosf")) {
|
} else if (Name[0] == 'c' && (Name == "cos" || Name == "cosf")) {
|
||||||
if (I.getNumOperands() == 2 && // Basic sanity checks.
|
if (I.getNumOperands() == 2 && // Basic sanity checks.
|
||||||
I.getOperand(1)->getType()->isFloatingPoint() &&
|
I.getOperand(1)->getType()->isFloatingPoint() &&
|
||||||
I.getType() == I.getOperand(1)->getType() &&
|
I.getType() == I.getOperand(1)->getType()) {
|
||||||
TLI.isOperationLegal(ISD::FCOS,
|
|
||||||
TLI.getValueType(I.getOperand(1)->getType()))) {
|
|
||||||
SDOperand Tmp = getValue(I.getOperand(1));
|
SDOperand Tmp = getValue(I.getOperand(1));
|
||||||
setValue(&I, DAG.getNode(ISD::FCOS, Tmp.getValueType(), Tmp));
|
setValue(&I, DAG.getNode(ISD::FCOS, Tmp.getValueType(), Tmp));
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue