[all-commits] [llvm/llvm-project] 3c7e32: [CIR] Coerce record returns from memory like Creat...

Adam Smith via All-commits all-commits at lists.llvm.org
Wed Sep 30 11:38:56 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3c7e3271a31891418af22f4dbddbb6949b1f8ec4
      https://github.com/llvm/llvm-project/commit/3c7e3271a31891418af22f4dbddbb6949b1f8ec4
  Author: Adam Smith <adams at nvidia.com>
  Date:   2026-09-30 (Wed, 30 Sep 2026)

  Changed paths:
    M clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp
    M clang/test/CIR/CodeGen/agg-atomic-cast.c
    M clang/test/CIR/CodeGen/call-conv-lowering-x86_64-empty.cpp
    M clang/test/CIR/CodeGen/call-conv-lowering-x86_64.c
    M clang/test/CIR/CodeGen/cast.c
    M clang/test/CIR/CodeGen/lambda.cpp
    M clang/test/CIR/CodeGen/nrvo.cpp
    M clang/test/CIR/CodeGen/paren-list-agg-init.cpp
    M clang/test/CIR/CodeGen/pointer-to-data-member.cpp
    M clang/test/CIR/CodeGen/temp-param-obj-decl.cpp
    M clang/test/CIR/CodeGen/three-way-cmp.cpp
    M clang/test/CIR/CodeGen/union-agg-init.c
    M clang/test/CIR/CodeGen/union-agg-init.cpp
    M clang/test/CIR/CodeGen/var-arg-aggregate.c
    A clang/test/CIR/Transforms/abi-lowering/coerce-record-return-from-memory.cir
    M clang/test/CIR/Transforms/abi-lowering/x86_64-bitint.cir
    M clang/test/CIR/Transforms/abi-lowering/x86_64-struct-direct-offset.cir
    M clang/test/CIR/Transforms/abi-lowering/x86_64-union.cir
    M clang/test/CIR/Transforms/abi-lowering/x86_64-vptr.cir

  Log Message:
  -----------
  [CIR] Coerce record returns from memory like CreateCoercedLoad (#227482)

Read a coerced record return straight from the alloca it was loaded
from. If that isn't possible, copy the record's bytes into a coercion
slot and read from there. Neither path stores the record as a value. A
union stored as a value keeps only its storage member and loses the
bytes that are padding in that member.

Assisted-by: Claude Code / Claude Opus 5.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