[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
Thu Jun 13 13:02:53 PDT 2024


farzonl wrote:

> Usually when new ISD nodes are added they are expanded for all types, so that every backend will get at least working code even if it is not optimal. The targets can then come along and override the defaults for the types they are interested in, to get better results.
> 
> For tan I would expect most vector types would want to scalarize, so marking them as expand would make sense. If more types than are necessary get marked as Expand that shouldn't be an issue, it looks like we already do that for a number of other nodes.

 Should this be considered a termporary change until their is parity across alll backends? I'm trying to understand why no on else has done this for sin\cos\log\exp\etc.

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


More information about the cfe-commits mailing list