[all-commits] [llvm/llvm-project] 1932bd: [CIR] Accept _Complex and all float formats in x86...

Adam Smith via All-commits all-commits at lists.llvm.org
Sat Aug 8 14:39:12 PDT 2026


  Branch: refs/heads/users/adams381/cir-callconv-x86_64-leaf-floats
  Home:   https://github.com/llvm/llvm-project
  Commit: 1932bd2c2faf725f6e0d5905855d25a0063383a9
      https://github.com/llvm/llvm-project/commit/1932bd2c2faf725f6e0d5905855d25a0063383a9
  Author: Adam Smith <adams at nvidia.com>
  Date:   2026-08-08 (Sat, 08 Aug 2026)

  Changed paths:
    M clang/include/clang/CIR/Dialect/Passes.h
    M clang/lib/CIR/Dialect/Transforms/CallConvLoweringPass.cpp
    M clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp
    M clang/lib/CIR/Lowering/CIRPasses.cpp
    A clang/test/CIR/CodeGen/call-conv-lowering-x86_64-abi-compat.c
    M clang/test/CIR/CodeGen/call-conv-lowering-x86_64.c
    M clang/test/CIR/Transforms/abi-lowering/x86_64-aggregate-nyi.cir
    M clang/test/CIR/Transforms/abi-lowering/x86_64-bitint.cir
    A clang/test/CIR/Transforms/abi-lowering/x86_64-complex.cir
    M clang/test/CIR/Transforms/abi-lowering/x86_64-variadic-call.cir
    M clang/test/CIR/Transforms/abi-lowering/x86_64-variadic-nyi.cir
    A clang/test/CIR/Transforms/abi-lowering/x86_64-vector.cir
    A clang/test/CIR/Transforms/abi-lowering/x86_64-wide-floats.cir

  Log Message:
  -----------
  [CIR] Accept _Complex and all float formats in x86_64 callconv lowering

The CallConvLowering bridge accepted only float and double, so a function taking
a _Complex, or a float in any other format, failed the pass instead of being
classified.  An all-float aggregate failed for a different reason: its SSE
eightbyte coerces to a vector, and the bridge had no way to represent one, so it
reported the coercion NYI rather than emitting a wrong signature.

Mapping every CIR floating-point type through FPTypeInterface covers all of them
at once.  A _Complex maps to the library's complex type and a vector coercion
now converts back to a CIR vector.

Accepting a long double also makes a union holding one classifiable.  That
exposes the ABI-compatibility flags, which the pass left at the library
defaults.  They now come from the triple and the compatibility version, which is
what lets a long double union reach registers on Darwin instead of memory.

updateArgAttrs appended argument attributes instead of setting them, so a name
already present landed in the dictionary twice.  CIRGen marks a _Complex long
double parameter llvm.noundef, and the ABI then passes it byval, which wants
llvm.noundef too.

An integer coercion lost its bit-precise flag coming back from the classifier.
A struct holding a _BitInt(128) then took __int128's 16-byte alignment for its
coerce slot instead of 8.

Assisted-by: Cursor / claude-opus-5



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