Skip to content

Commit d40c52d

Browse files
committed
[PowerPC] Mark llvm.tan on vectors as expand
1 parent 53dbc1f commit d40c52d

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

llvm/lib/Target/PowerPC/PPCISelLowering.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,7 @@ PPCTargetLowering::PPCTargetLowering(const PPCTargetMachine &TM,
860860
setOperationAction(ISD::FEXP2, VT, Expand);
861861
setOperationAction(ISD::FSIN, VT, Expand);
862862
setOperationAction(ISD::FCOS, VT, Expand);
863+
setOperationAction(ISD::FTAN, VT, Expand);
863864
setOperationAction(ISD::FABS, VT, Expand);
864865
setOperationAction(ISD::FFLOOR, VT, Expand);
865866
setOperationAction(ISD::FCEIL, VT, Expand);

llvm/test/CodeGen/PowerPC/lower-intrinsics-nofast-mass.ll

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,12 @@ entry:
145145
%0 = tail call double @llvm.sin.f64(double %a)
146146
ret double %0
147147
}
148+
149+
define <2 x double> @tan_v2f64_nofast(<2 x double> %a) {
150+
; CHECK-LABEL: tan_v2f64_nofast
151+
; CHECK-NOT: bl __xl_tan
152+
; CHECK: blr
153+
entry:
154+
%0 = tail call <2 x double> @llvm.tan.v2f64(<2 x double> %a)
155+
ret <2 x double> %0
156+
}

0 commit comments

Comments
 (0)