[llvm] [PowerPC] Mark llvm.tan on vectors as expand (PR #95507)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 13 23:05:23 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-powerpc
Author: Qiu Chaofan (ecnelises)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/95507.diff
2 Files Affected:
- (modified) llvm/lib/Target/PowerPC/PPCISelLowering.cpp (+1)
- (modified) llvm/test/CodeGen/PowerPC/lower-intrinsics-nofast-mass.ll (+9)
``````````diff
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
+}
``````````
</details>
https://github.com/llvm/llvm-project/pull/95507
More information about the llvm-commits
mailing list