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

Farzon Lotfi via cfe-commits cfe-commits at lists.llvm.org
Wed May 29 12:11:03 PDT 2024


farzonl wrote:

> Hi, we're seeing a codegen issue building Fuchsia after this patch. I'm looking now, but so far I'm not sure why this is happening. Would you mind taking a look?
> 
> Error:
> fatal error: error in backend: Cannot select: intrinsic %llvm.tan
> PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.

> 4.	Running pass 'X86 DAG->DAG Instruction Selection' on function '@spinel_transform_stack_push_skew_x'
> #0 0x0000558e5225bc78 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (../../prebuilt/third_party/clang/custom/bin/clang+0x8936c78)
> clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
> Fuchsia clang version 19.0.0git (https://llvm.googlesource.com/llvm-project 1de6011c34b185235cd65c2e3fb030015d182968)

Hi @ilovepi, This is interesting because I didn't see anything in x86 dag specific to constraint intrinsics but I suspect exposing `tan` as an ISDOpcodes is causing the problem.  The issue is because x86 DAG instruction selection hasn't landed yet: https://github.com/llvm/llvm-project/pull/90503 and the pass is trying to replace the intrinsic  with something else and can't. I'm still waiting on approvals for that part.

Looks like the right course is to revert this change for now. 

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


More information about the cfe-commits mailing list