[llvm] [arm64] Add tan intrinsic lowering (PR #94545)

Farzon Lotfi via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 6 10:04:29 PDT 2024


================
@@ -727,14 +728,14 @@ AArch64TargetLowering::AArch64TargetLowering(const TargetMachine &TM,
     setOperationAction(ISD::FCOPYSIGN, MVT::bf16, Promote);
   }
 
-  for (auto Op : {ISD::FREM,        ISD::FPOW,         ISD::FPOWI,
-                  ISD::FCOS,        ISD::FSIN,         ISD::FSINCOS,
-                  ISD::FEXP,        ISD::FEXP2,        ISD::FEXP10,
-                  ISD::FLOG,        ISD::FLOG2,        ISD::FLOG10,
-                  ISD::STRICT_FREM,
-                  ISD::STRICT_FPOW, ISD::STRICT_FPOWI, ISD::STRICT_FCOS,
-                  ISD::STRICT_FSIN, ISD::STRICT_FEXP,  ISD::STRICT_FEXP2,
-                  ISD::STRICT_FLOG, ISD::STRICT_FLOG2, ISD::STRICT_FLOG10}) {
+  for (auto Op : {ISD::FREM,         ISD::FPOW,         ISD::FPOWI,
+                  ISD::FCOS,         ISD::FSIN,         ISD::FSINCOS,
+                  ISD::FTAN,         ISD::FEXP,         ISD::FEXP2,
+                  ISD::FEXP10,       ISD::FLOG,         ISD::FLOG2,
+                  ISD::FLOG10,       ISD::STRICT_FREM,  ISD::STRICT_FPOW,
----------------
farzonl wrote:

Looks likere there are two places to add tests:
- llvm/test/CodeGen/AArch64/fp-intrinsics-fp16.ll
- llvm/test/CodeGen/AArch64/fp-intrinsics.ll

`fp-intrinsics.ll` I can add now and  to PR #94559 and everything will work.

fp-intrinsics-fp16.ll will need to wait for this  pr to merge before I add the tests because  f16 is handled on a per target basis. 


https://github.com/llvm/llvm-project/pull/94545


More information about the llvm-commits mailing list