[all-commits] [llvm/llvm-project] 831e79: DAG: Merge all sincos_stret emission code into leg...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Tue Nov 4 10:20:22 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 831e79adff4506a0b22a770dcaa46bf5a37257cb
      https://github.com/llvm/llvm-project/commit/831e79adff4506a0b22a770dcaa46bf5a37257cb
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-11-04 (Tue, 04 Nov 2025)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.h
    M llvm/lib/Target/ARM/ARMISelLowering.cpp
    M llvm/lib/Target/ARM/ARMISelLowering.h
    M llvm/lib/Target/X86/X86ISelLowering.cpp

  Log Message:
  -----------
  DAG: Merge all sincos_stret emission code into legalizer (#166295)

This avoids AArch64 legality rules depending on libcall
availability.

ARM, AArch64, and X86 all had custom lowering of fsincos which
all were just to emit calls to sincos_stret / sincosf_stret. This
messes with the cost heuristics around legality, because really
it's an expand/libcall cost and not a favorable custom.

This is a bit ugly, because we're emitting code trying to match the
C ABI lowered IR type for the aggregate return type. This now also
gives an easy way to lift the unhandled x86_32 darwin case, since
ARM already handled the return as sret case.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list