[clang] [llvm] [clang] Reland Add tanf16 builtin and support for tan constrained intrinsic (PR #94559)

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 12 15:22:14 PDT 2024


farzonl wrote:

@aeubanks The issue you are seeing here is because only aarch64 and x86 backends have tan intrinsic lowering support.  This shouldn't be a regression because there never was a llvm.tan.v2f32 for ARMv7.  That still needs to be add. Can you show me how you could have  generated `llvm.tan.v2f32` for armv7 from clang?

By default [TargetLoweringBase.cpp:1016-1022](https://github.com/llvm/llvm-project/blob/8f6acd973a38da6dce45faa676cbb51da37f72e5/llvm/lib/CodeGen/TargetLoweringBase.cpp#L1016C3-L1022C1) only supports lowering form f32, f64, and f128 scalars across all backends.

The builtins that were added (`Builtin::BItanf`, `Builtin::BItanl`, `Builtin::BI__builtin_tan`, `Builtin::BI__builtin_tanf`, `Builtin::BI__builtin_tanf16`, `Builtin::BI__builtin_tanl`, and `Builtin::BI__builtin_tanf128`) should only cover scalar cases.

So i'm not sure how this pr could have generate the intrinsic you have reported.

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


More information about the cfe-commits mailing list