Commit 2f0308e
authored
[arm64] Add tan intrinsic lowering (#94545)
This change is an implementation of
#87367 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
This PR is just for Tan.
Now that x86 tan backend landed:
#90503 we can add other
backends since the shared pieces are in tree now.
Changes:
- `llvm/include/llvm/Analysis/VecFuncs.def` - vectorization of tan for
arm64 backends.
- `llvm/lib/Target/AArch64/AArch64FastISel.cpp` - Add tan to the libcall
table
- `llvm/lib/Target/AArch64/AArch64ISelLowering.cpp` - Add tan expansion
for f128, f16, and vector\neon operations
- `llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp` define
`G_FTAN` as a legal arm64 instruction
resolves #947551 parent ac02168 commit 2f0308e
16 files changed
Lines changed: 704 additions & 41 deletions
File tree
- llvm
- include/llvm/Analysis
- lib/Target/AArch64
- GISel
- test
- CodeGen/AArch64
- GlobalISel
- Transforms/LoopVectorize/AArch64
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
95 | 100 | | |
96 | 101 | | |
97 | 102 | | |
| |||
584 | 589 | | |
585 | 590 | | |
586 | 591 | | |
| 592 | + | |
587 | 593 | | |
588 | 594 | | |
589 | 595 | | |
| |||
681 | 687 | | |
682 | 688 | | |
683 | 689 | | |
| 690 | + | |
684 | 691 | | |
685 | 692 | | |
686 | 693 | | |
| |||
828 | 835 | | |
829 | 836 | | |
830 | 837 | | |
| 838 | + | |
| 839 | + | |
831 | 840 | | |
832 | 841 | | |
833 | 842 | | |
| |||
1087 | 1096 | | |
1088 | 1097 | | |
1089 | 1098 | | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
1090 | 1104 | | |
1091 | 1105 | | |
1092 | 1106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3534 | 3534 | | |
3535 | 3535 | | |
3536 | 3536 | | |
| 3537 | + | |
3537 | 3538 | | |
3538 | 3539 | | |
3539 | 3540 | | |
| |||
3542 | 3543 | | |
3543 | 3544 | | |
3544 | 3545 | | |
3545 | | - | |
3546 | | - | |
3547 | | - | |
3548 | | - | |
3549 | | - | |
| 3546 | + | |
| 3547 | + | |
| 3548 | + | |
| 3549 | + | |
| 3550 | + | |
3550 | 3551 | | |
3551 | 3552 | | |
3552 | 3553 | | |
| |||
3558 | 3559 | | |
3559 | 3560 | | |
3560 | 3561 | | |
3561 | | - | |
| 3562 | + | |
3562 | 3563 | | |
3563 | 3564 | | |
| 3565 | + | |
| 3566 | + | |
| 3567 | + | |
3564 | 3568 | | |
3565 | 3569 | | |
3566 | 3570 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
| 546 | + | |
546 | 547 | | |
547 | 548 | | |
548 | 549 | | |
| |||
727 | 728 | | |
728 | 729 | | |
729 | 730 | | |
730 | | - | |
731 | | - | |
732 | | - | |
733 | | - | |
734 | | - | |
735 | | - | |
736 | | - | |
737 | | - | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
738 | 739 | | |
739 | 740 | | |
740 | 741 | | |
| |||
1171 | 1172 | | |
1172 | 1173 | | |
1173 | 1174 | | |
| 1175 | + | |
1174 | 1176 | | |
1175 | | - | |
1176 | | - | |
1177 | | - | |
1178 | | - | |
1179 | | - | |
1180 | | - | |
1181 | | - | |
1182 | | - | |
1183 | | - | |
1184 | | - | |
1185 | | - | |
1186 | | - | |
1187 | | - | |
1188 | | - | |
1189 | | - | |
1190 | | - | |
1191 | | - | |
| 1177 | + | |
| 1178 | + | |
| 1179 | + | |
| 1180 | + | |
| 1181 | + | |
| 1182 | + | |
| 1183 | + | |
| 1184 | + | |
| 1185 | + | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
1192 | 1194 | | |
1193 | | - | |
| 1195 | + | |
1194 | 1196 | | |
1195 | 1197 | | |
1196 | 1198 | | |
| |||
1622 | 1624 | | |
1623 | 1625 | | |
1624 | 1626 | | |
| 1627 | + | |
1625 | 1628 | | |
1626 | 1629 | | |
1627 | 1630 | | |
| |||
1803 | 1806 | | |
1804 | 1807 | | |
1805 | 1808 | | |
| 1809 | + | |
1806 | 1810 | | |
1807 | 1811 | | |
1808 | 1812 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | | - | |
272 | | - | |
| 270 | + | |
| 271 | + | |
273 | 272 | | |
274 | 273 | | |
275 | 274 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2313 | 2313 | | |
2314 | 2314 | | |
2315 | 2315 | | |
| 2316 | + | |
| 2317 | + | |
| 2318 | + | |
| 2319 | + | |
| 2320 | + | |
| 2321 | + | |
| 2322 | + | |
| 2323 | + | |
2316 | 2324 | | |
2317 | 2325 | | |
2318 | 2326 | | |
| |||
0 commit comments