diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 12e33ddb8eb53..e922b5d445e68 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -860,6 +860,7 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM, setOperationAction(ISD::FEXP2, VT, Expand); setOperationAction(ISD::FSIN, VT, Expand); setOperationAction(ISD::FCOS, VT, Expand); + setOperationAction(ISD::FTAN, VT, Expand); setOperationAction(ISD::FABS, VT, Expand); setOperationAction(ISD::FFLOOR, VT, Expand); setOperationAction(ISD::FCEIL, VT, Expand); diff --git a/llvm/test/CodeGen/PowerPC/lower-intrinsics-nofast-mass.ll b/llvm/test/CodeGen/PowerPC/lower-intrinsics-nofast-mass.ll index 3d6e6da3b66d9..0c49d10e675a7 100644 --- a/llvm/test/CodeGen/PowerPC/lower-intrinsics-nofast-mass.ll +++ b/llvm/test/CodeGen/PowerPC/lower-intrinsics-nofast-mass.ll @@ -145,3 +145,12 @@ entry: %0 = tail call double @llvm.sin.f64(double %a) ret double %0 } + +define <2 x double> @tan_v2f64_nofast(<2 x double> %a) { +; CHECK-LABEL: tan_v2f64_nofast +; CHECK-NOT: bl __xl_tan +; CHECK: blr +entry: + %0 = tail call <2 x double> @llvm.tan.v2f64(<2 x double> %a) + ret <2 x double> %0 +}