Farzon Lotfi
1d87433593
[x86] Add tan intrinsic part 4 ( #90503 )
...
This change is an implementation of #87367 's investigation on supporting
IEEE math operations as intrinsics.
Which was discussed in this RFC:
https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294
Much of this change was following how G_FSIN and G_FCOS were used.
Changes:
- `llvm/docs/GlobalISel/GenericOpcode.rst` - Document the `G_FTAN`
opcode
- `llvm/docs/LangRef.rst` - Document the tan intrinsic
- `llvm/include/llvm/Analysis/VecFuncs.def` - Associate the tan
intrinsic as a vector function similar to the tanf libcall.
- `llvm/include/llvm/CodeGen/BasicTTIImpl.h` - Map the tan intrinsic to
`ISD::FTAN`
- `llvm/include/llvm/CodeGen/ISDOpcodes.h` - Define ISD opcodes for
`FTAN` and `STRICT_FTAN`
- `llvm/include/llvm/IR/Intrinsics.td` - Create the tan intrinsic
- `llvm/include/llvm/IR/RuntimeLibcalls.def` - Define tan libcall
mappings
- `llvm/include/llvm/Target/GenericOpcodes.td` - Define the `G_FTAN`
Opcode
- `llvm/include/llvm/Support/TargetOpcodes.def` - Create a `G_FTAN`
Opcode handler
- `llvm/include/llvm/Target/GlobalISel/SelectionDAGCompat.td` - Map
`G_FTAN` to `ftan`
- `llvm/include/llvm/Target/TargetSelectionDAG.td` - Define `ftan`,
`strict_ftan`, and `any_ftan` and map them to the ISD opcodes for `FTAN`
and `STRICT_FTAN`
- `llvm/lib/Analysis/VectorUtils.cpp` - Associate the tan intrinsic as a
vector intrinsic
- `llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp` Map the tan intrinsic
to `G_FTAN` Opcode
- `llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp` - Add `G_FTAN` to
the list of floating point math operations also associate `G_FTAN` with
the `TAN_F` runtime lib.
- `llvm/lib/CodeGen/GlobalISel/Utils.cpp` - More floating point math
operation common behaviors.
- llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp - List the function
expansion operations for `FTAN` and `STRICT_FTAN`. Also define both
opcodes in `PromoteNode`.
- `llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp` - More `FTAN`
and `STRICT_FTAN` handling in the legalizer
- `llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h` - Define
`SoftenFloatRes_FTAN` and `ExpandFloatRes_FTAN`.
- `llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp` - Define `FTAN`
as a legal vector operation.
- `llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp` - Define
`FTAN` as a legal vector operation.
- `llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp` - define tan as an
intrinsic that doesn't return NaN.
- `llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp` Map
`LibFunc_tan`, `LibFunc_tanf`, and `LibFunc_tanl` to `ISD::FTAN`. Map
`Intrinsic::tan` to `ISD::FTAN` and add selection dag handling for
`Intrinsic::tan`.
- `llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp` - Define `ftan`
and `strict_ftan` names for the equivalent ISD opcodes.
- `llvm/lib/CodeGen/TargetLoweringBase.cpp` -Define a Tan128 libcall and
ISD::FTAN as a target lowering action.
- `llvm/lib/Target/X86/X86ISelLowering.cpp` - Add x86_64 lowering for
tan intrinsic
resolves https://github.com/llvm/llvm-project/issues/70082
2024-06-05 15:01:33 -04:00
..
2024-06-05 11:18:06 +01:00
2024-01-24 15:25:29 +01:00
2024-05-23 21:50:47 +01:00
2023-12-08 09:56:55 +00:00
2024-05-21 15:31:02 +08:00
2024-05-22 11:07:24 +01:00
2024-05-30 17:43:40 -07:00
2024-05-24 18:01:58 +01:00
2023-05-17 17:03:15 +02:00
2024-06-05 15:01:33 -04:00
2023-05-17 17:03:15 +02:00
2022-12-14 15:16:59 +01:00
2022-12-08 02:38:47 +03:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2024-05-15 14:03:21 +01:00
2022-12-14 15:16:59 +01:00
2024-04-16 21:24:25 +01:00
2023-11-20 11:02:27 -08:00
2022-12-14 15:16:59 +01:00
2022-12-27 23:01:41 +00:00
2022-12-14 15:16:59 +01:00
2024-02-05 15:42:07 +00:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2023-06-12 13:10:22 +02:00
2024-03-26 16:01:57 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2023-08-29 11:42:18 +01:00
2024-03-13 14:30:09 +00:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2023-09-04 12:01:14 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2023-10-28 17:47:46 +08:00
2023-10-24 20:27:39 -07:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2023-05-10 11:26:23 -07:00
2024-01-01 19:51:15 +00:00
2023-01-11 14:08:06 +00:00
2023-01-04 17:25:42 +01:00
2024-05-03 14:40:49 +01:00
2024-01-04 22:53:18 +00:00
2024-01-26 13:19:25 +00:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2024-01-24 15:25:29 +01:00
2024-06-05 11:18:06 +01:00
2024-06-05 11:18:06 +01:00
2024-06-05 11:18:06 +01:00
2023-08-29 11:42:18 +01:00
2024-06-05 11:18:06 +01:00
2024-06-05 11:18:06 +01:00
2022-12-14 15:16:59 +01:00
2023-04-17 13:08:15 +01:00
2022-12-14 15:16:59 +01:00
2024-04-16 15:26:25 -05:00
2023-08-29 11:42:18 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2023-01-06 10:56:17 +00:00
2023-11-27 12:54:11 -08:00
2022-12-05 22:17:30 +03:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2024-04-06 14:48:41 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2023-11-29 13:19:50 +00:00
2023-12-08 18:30:30 +00:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2024-01-09 10:50:08 +00:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2024-04-09 11:14:05 +01:00
2022-12-14 15:16:59 +01:00
2023-10-22 11:41:38 +01:00
2024-04-09 11:14:05 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2023-06-12 13:10:22 +02:00
2024-01-31 13:31:28 +00:00
2023-01-04 17:25:42 +01:00
2023-01-11 14:08:06 +00:00
2024-01-31 13:31:28 +00:00
2024-06-05 11:18:06 +01:00
2022-12-14 15:16:59 +01:00
2023-08-29 11:42:18 +01:00
2022-12-14 15:16:59 +01:00
2024-06-05 11:18:06 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2023-12-05 14:09:36 +01:00
2023-08-08 18:10:23 -04:00
2024-01-05 14:39:16 +08:00
2022-12-14 15:16:59 +01:00
2024-06-05 11:18:06 +01:00
2022-12-14 15:16:59 +01:00
2023-11-06 18:49:49 +00:00
2024-01-05 14:39:16 +08:00
2024-01-05 14:39:16 +08:00
2022-12-14 15:16:59 +01:00
2023-08-29 11:42:18 +01:00
2024-01-31 13:31:28 +00:00
2023-09-28 21:15:34 +08:00
2023-09-29 22:18:32 +08:00
2023-09-29 22:18:32 +08:00
2024-02-05 11:57:34 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2024-04-09 11:14:05 +01:00
2024-01-09 10:50:08 +00:00
2023-04-09 09:18:24 +01:00
2023-01-06 12:14:45 +01:00
2024-01-05 14:39:16 +08:00
2022-12-14 15:16:59 +01:00
2023-01-06 10:56:17 +00:00
2022-12-14 15:16:59 +01:00
2023-10-28 17:47:46 +08:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2023-06-20 13:17:28 -04:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2023-09-20 12:08:52 +05:30
2022-12-14 15:16:59 +01:00
2023-12-18 09:41:54 +00:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2023-06-12 13:10:22 +02:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2024-03-04 11:33:30 +00:00
2022-12-05 22:17:30 +03:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2023-09-20 12:08:52 +05:30
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2023-04-26 09:43:54 +02:00
2023-01-04 17:25:42 +01:00
2022-12-14 15:16:59 +01:00
2023-07-12 14:35:55 +02:00
2022-12-14 15:16:59 +01:00
2022-12-21 13:58:50 +00:00
2022-12-14 15:27:31 +01:00
2022-12-14 15:16:59 +01:00
2024-01-31 13:31:28 +00:00
2023-01-11 14:08:06 +00:00
2023-11-20 10:01:25 -05:00
2023-12-08 18:30:30 +00:00
2024-05-27 17:03:53 -07:00
2023-01-11 14:08:06 +00:00
2023-01-11 14:08:06 +00:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2024-03-26 16:01:57 +01:00
2024-03-26 16:01:57 +01:00
2023-11-21 10:54:36 +00:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2023-05-01 13:55:11 -07:00
2023-01-06 12:14:45 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2023-04-17 13:49:49 +01:00
2022-12-14 15:16:59 +01:00
2022-12-08 02:38:47 +03:00
2023-06-12 13:10:22 +02:00
2022-12-14 15:16:59 +01:00
2023-08-22 20:05:57 +01:00
2023-01-06 12:14:45 +01:00
2023-01-06 12:14:45 +01:00
2023-12-05 14:09:36 +01:00
2023-08-29 11:42:18 +01:00
2023-08-29 11:42:18 +01:00
2023-01-11 14:08:06 +00:00
2022-12-14 15:16:59 +01:00
2024-02-03 16:19:10 +00:00
2024-01-26 11:13:05 +00:00
2024-05-20 11:47:30 +02:00
2022-12-14 15:16:59 +01:00
2023-08-29 11:42:18 +01:00
2023-01-11 14:08:06 +00:00
2023-03-07 17:10:34 +01:00
2024-01-09 10:50:08 +00:00
2023-08-29 11:42:18 +01:00
2023-04-06 09:38:47 +02:00
2023-11-17 09:34:24 +01:00
2023-11-29 13:19:50 +00:00
2023-12-05 15:21:59 +00:00
2023-02-15 14:07:51 -08:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2023-09-04 09:17:18 +01:00
2024-03-19 09:47:07 -07:00
2023-07-26 23:23:14 +01:00
2024-03-19 09:47:07 -07:00
2024-01-24 15:25:29 +01:00
2024-04-25 01:45:50 +08:00
2024-01-01 19:51:15 +00:00
2022-12-14 15:16:59 +01:00
2023-11-27 12:54:11 -08:00
2022-12-14 15:16:59 +01:00
2024-04-09 11:14:05 +01:00
2024-05-04 20:53:54 +01:00
2024-04-11 19:10:53 +08:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2024-01-16 21:54:58 -08:00
2024-01-31 13:31:28 +00:00
2022-12-14 15:16:59 +01:00
2024-01-16 21:54:58 -08:00
2022-12-14 15:16:59 +01:00
2023-11-22 12:48:04 +00:00
2024-01-24 15:25:29 +01:00
2023-11-23 11:35:21 +00:00
2024-02-05 11:57:34 +01:00
2024-06-04 20:37:46 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2024-06-03 20:20:30 +01:00
2024-01-01 19:51:15 +00:00
2023-12-08 12:18:31 +00:00
2024-01-01 19:51:15 +00:00
2022-12-14 15:16:59 +01:00
2023-12-08 12:18:31 +00:00
2023-12-08 18:30:30 +00:00
2022-12-14 15:16:59 +01:00
2024-01-24 15:25:29 +01:00
2022-12-14 15:16:59 +01:00
2023-04-05 11:18:38 +01:00
2023-06-12 13:10:22 +02:00
2022-12-14 15:16:59 +01:00
2023-08-29 11:42:18 +01:00
2023-01-04 17:25:42 +01:00
2023-10-17 03:49:39 +08:00
2024-05-26 18:31:36 -07:00
2024-05-03 14:40:49 +01:00
2024-05-03 14:40:49 +01:00
2023-07-11 19:12:59 -07:00
2024-05-03 14:40:49 +01:00
2023-09-21 10:12:29 +01:00
2022-12-14 15:16:59 +01:00
2024-04-09 11:14:05 +01:00
2023-05-30 16:42:55 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2023-08-03 00:37:19 -07:00
2022-12-14 15:16:59 +01:00
2023-12-13 21:05:24 +00:00
2022-12-14 15:16:59 +01:00
2024-03-06 15:59:35 -05:00
2023-08-29 11:42:18 +01:00
2022-12-14 15:16:59 +01:00
2023-01-04 17:25:42 +01:00
2024-03-26 16:01:57 +01:00
2022-12-14 15:16:59 +01:00
2024-05-15 11:17:23 +01:00
2022-12-14 15:16:59 +01:00
2024-04-23 11:50:26 +01:00
2024-01-12 13:14:13 +00:00
2024-02-16 12:58:56 +00:00
2023-12-02 16:12:38 +00:00
2022-12-14 15:16:59 +01:00
2023-08-29 11:42:18 +01:00
2023-08-29 11:42:18 +01:00
2023-08-29 11:42:18 +01:00
2023-08-29 11:42:18 +01:00
2024-01-31 13:31:28 +00:00
2023-11-28 15:01:32 +00:00
2024-05-19 15:45:23 +00:00
2023-12-05 14:09:36 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2023-10-28 17:47:46 +08:00
2022-12-14 15:16:59 +01:00
2024-05-19 15:45:23 +00:00
2023-01-04 17:25:42 +01:00
2022-12-14 15:16:59 +01:00
2024-01-31 13:31:28 +00:00
2022-12-14 15:16:59 +01:00
2022-12-05 22:17:30 +03:00
2024-01-24 15:25:29 +01:00
2023-06-12 13:10:22 +02:00
2022-12-24 18:34:54 +00:00
2023-04-25 21:47:14 +01:00
2024-04-16 09:48:13 -04:00
2023-01-06 10:56:17 +00:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2022-12-14 15:16:59 +01:00
2024-05-07 21:31:42 +01:00
2024-02-20 16:43:57 +00:00
2024-05-30 17:43:40 -07:00
2024-04-04 18:30:17 -04:00
2024-06-04 08:58:16 +01:00
2024-01-01 19:51:15 +00:00
2022-12-05 22:17:30 +03:00
2024-05-30 17:43:40 -07:00
2023-11-12 13:00:44 +00:00
2024-06-05 11:18:06 +01:00
2023-12-08 18:30:30 +00:00
2024-05-30 17:43:40 -07:00
2022-12-14 15:16:59 +01:00
2023-12-15 00:23:14 +08:00
2022-12-19 20:44:44 +00:00
2022-12-19 20:44:44 +00:00
2023-01-11 14:08:06 +00:00
2023-08-29 11:42:18 +01:00
2022-12-14 15:16:59 +01:00