mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Enable codegen for long double abs, sin, cos
llvm-svn: 42368
This commit is contained in:
parent
c73d5c73a6
commit
69595b587f
@ -2996,7 +2996,8 @@ void SelectionDAGLowering::visitCall(CallInst &I) {
|
||||
}
|
||||
} else if (NameStr[0] == 'f' &&
|
||||
((NameLen == 4 && !strcmp(NameStr, "fabs")) ||
|
||||
(NameLen == 5 && !strcmp(NameStr, "fabsf")))) {
|
||||
(NameLen == 5 && !strcmp(NameStr, "fabsf")) ||
|
||||
(NameLen == 5 && !strcmp(NameStr, "fabsl")))) {
|
||||
if (I.getNumOperands() == 2 && // Basic sanity checks.
|
||||
I.getOperand(1)->getType()->isFloatingPoint() &&
|
||||
I.getType() == I.getOperand(1)->getType()) {
|
||||
@ -3006,7 +3007,8 @@ void SelectionDAGLowering::visitCall(CallInst &I) {
|
||||
}
|
||||
} else if (NameStr[0] == 's' &&
|
||||
((NameLen == 3 && !strcmp(NameStr, "sin")) ||
|
||||
(NameLen == 4 && !strcmp(NameStr, "sinf")))) {
|
||||
(NameLen == 4 && !strcmp(NameStr, "sinf")) ||
|
||||
(NameLen == 4 && !strcmp(NameStr, "sinl")))) {
|
||||
if (I.getNumOperands() == 2 && // Basic sanity checks.
|
||||
I.getOperand(1)->getType()->isFloatingPoint() &&
|
||||
I.getType() == I.getOperand(1)->getType()) {
|
||||
@ -3016,7 +3018,8 @@ void SelectionDAGLowering::visitCall(CallInst &I) {
|
||||
}
|
||||
} else if (NameStr[0] == 'c' &&
|
||||
((NameLen == 3 && !strcmp(NameStr, "cos")) ||
|
||||
(NameLen == 4 && !strcmp(NameStr, "cosf")))) {
|
||||
(NameLen == 4 && !strcmp(NameStr, "cosf")) ||
|
||||
(NameLen == 4 && !strcmp(NameStr, "cosl")))) {
|
||||
if (I.getNumOperands() == 2 && // Basic sanity checks.
|
||||
I.getOperand(1)->getType()->isFloatingPoint() &&
|
||||
I.getType() == I.getOperand(1)->getType()) {
|
||||
|
@ -418,6 +418,10 @@ X86TargetLowering::X86TargetLowering(TargetMachine &TM)
|
||||
setOperationAction(ISD::UNDEF, MVT::f80, Expand);
|
||||
setOperationAction(ISD::FCOPYSIGN, MVT::f80, Expand);
|
||||
setOperationAction(ISD::ConstantFP, MVT::f80, Expand);
|
||||
if (!UnsafeFPMath) {
|
||||
setOperationAction(ISD::FSIN , MVT::f80 , Expand);
|
||||
setOperationAction(ISD::FCOS , MVT::f80 , Expand);
|
||||
}
|
||||
|
||||
// First set operation action for all vector types to expand. Then we
|
||||
// will selectively turn on ones that can be effectively codegen'd.
|
||||
|
Loading…
Reference in New Issue
Block a user