[all-commits] [llvm/llvm-project] b8d501: [CIR] Read a non-byval parameter back out of its s...

Adam Smith via All-commits all-commits at lists.llvm.org
Wed Sep 23 12:29:02 PDT 2026


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

  Changed paths:
    M clang/lib/CIR/Dialect/Transforms/CallConvLoweringPass.cpp
    M clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.cpp
    M clang/lib/CIR/Dialect/Transforms/TargetLowering/CIRABIRewriteContext.h
    A clang/test/CIR/CodeGen/call-conv-lowering-x86_64-non-byval-thunk-mixed.cpp
    A clang/test/CIR/CodeGen/call-conv-lowering-x86_64-non-byval-thunk-sret.cpp
    A clang/test/CIR/CodeGen/call-conv-lowering-x86_64-non-byval-thunk.cpp
    M clang/test/CIR/Transforms/abi-lowering/indirect-non-byval-forward-param.cir
    M clang/test/CIR/Transforms/abi-lowering/indirect-non-byval-nyi.cir

  Log Message:
  -----------
  [CIR] Read a non-byval parameter back out of its spill slot (#225010)

CallConvLowering recognizes a forwarded non-byval indirect argument by
the slot its operand was loaded from. At -O1 and above cir-simplify
folds that load away when the slot is a constant alloca, which is what
CIRGen emits for a const-qualified by-value parameter. The walk that
gives each such parameter's slot the alignment the ABI promises now also
reads the record back out of the slot at the spill and points the
parameter's call-argument uses at that load, so an Expand, byval or
coerced argument reads it too.

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