[clang] [clang] Add sincos builtin using `llvm.sincos` intrinsic (PR #114086)
Matt Arsenault via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 17 03:47:05 PST 2024
================
@@ -3232,6 +3264,22 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID,
return RValue::get(emitUnaryMaybeConstrainedFPBuiltin(
*this, E, Intrinsic::sinh, Intrinsic::experimental_constrained_sinh));
+ case Builtin::BIsincos:
+ case Builtin::BIsincosf:
+ case Builtin::BIsincosl:
+ case Builtin::BI__builtin_sincos:
+ case Builtin::BI__builtin_sincosf:
+ case Builtin::BI__builtin_sincosl:
+ // Only use the llvm.sincos.* builtin on AArch64 with optimizations.
+ // Currently, getting codegen that is no worse than the direct call
+ // requires using AA during codegen. This is not done at optlevel=none,
+ // and not all targets support this (AArch64 is one of the few known to).
----------------
arsenm wrote:
```suggestion
```
https://github.com/llvm/llvm-project/pull/114086
More information about the cfe-commits
mailing list