[all-commits] [llvm/llvm-project] cd667f: clang: Hack around opencl enqueue_block using wron...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Thu Mar 6 00:34:36 PST 2025


  Branch: refs/heads/users/arsenm/clang/fix-using-wrong-pointer-type-block-enqueue-argument
  Home:   https://github.com/llvm/llvm-project
  Commit: cd667f54c8fe75ff642994c250505e60f3aa6c5b
      https://github.com/llvm/llvm-project/commit/cd667f54c8fe75ff642994c250505e60f3aa6c5b
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2025-03-06 (Thu, 06 Mar 2025)

  Changed paths:
    M clang/lib/CodeGen/CGBuiltin.cpp
    M clang/test/CodeGenOpenCL/amdgpu-enqueue-kernel.cl

  Log Message:
  -----------
  clang: Hack around opencl enqueue_block using wrong ABI for aggregrate

EmitAggExprToLValue started wrapping the temporary alloca in an addrspacecast
at some point. We take the direct type from this as the pointer argument for the
runtime function type, but this isn't correct. Technically, we should be querying
the target's ABI for what IR to produce for this sequence. The assumption seems to
always have been that this will be indirectly passed with byval (or byref).

I started working on a patch to go through the ABI handling, but it seems to
require more time and/or clang expertise than I have at the moment.



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