[clang] [llvm] [x86] Add tan intrinsic part 4 (PR #90503)
Farzon Lotfi via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 29 12:01:48 PDT 2024
farzonl wrote:
> Nit: the `declare` is not necessary anymore. You touched the IRTranslator without a test at, e.g., https://github.com/llvm/llvm-project/blob/main/llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
The aarch64 backend tag is a misnomer because adding `G_FTAN` caused the legalizer to complain in this arm64 test case: llvm/test/CodeGen/AArch64/GlobalISel/legalizer-info-validation.mir
I could add
```
declare float @llvm.tan.f32(float)
define float @test_tan_f32(float %x) {
; CHECK-LABEL: name: test_tan_f32
; CHECK: %{{[0-9]+}}:_(s32) = G_FTAN %{{[0-9]+}}
%y = call float @llvm.tan.f32(float %x)
ret float %y
}
```
But I feel like this should be added when a tan intrinsic lowering is done for arm64 in llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
https://github.com/llvm/llvm-project/pull/90503
More information about the cfe-commits
mailing list