[all-commits] [llvm/llvm-project] c8f70d: [clang][CodeGen] Additional fixes for #114062 (#12...
Alex Voicu via All-commits
all-commits at lists.llvm.org
Wed Feb 26 18:03:38 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: c8f70d7286db0eb54b001a6621a863b96c006e45
https://github.com/llvm/llvm-project/commit/c8f70d7286db0eb54b001a6621a863b96c006e45
Author: Alex Voicu <alexandru.voicu at amd.com>
Date: 2025-02-27 (Thu, 27 Feb 2025)
Changed paths:
M clang/lib/CodeGen/CGCall.cpp
M clang/lib/CodeGen/CGExprAgg.cpp
M clang/lib/CodeGen/CGExprScalar.cpp
M clang/test/CodeGen/partial-reinitialization2.c
A clang/test/CodeGenCXX/sret_cast_with_nonzero_alloca_as.cpp
A clang/test/OpenMP/amdgcn_sret_ctor.cpp
Log Message:
-----------
[clang][CodeGen] Additional fixes for #114062 (#128166)
This addresses two issues introduced by moving indirect args into an
explicit AS (please see
<https://github.com/llvm/llvm-project/pull/114062#issuecomment-2659829790>
and
<https://github.com/llvm/llvm-project/pull/114062#issuecomment-2661158477>):
1. Unconditionally stripping casts from a pre-allocated return slot was
incorrect / insufficient (this is illustrated by the
`amdgcn_sret_ctor.cpp` test);
2. Putting compiler manufactured sret args in a non default AS can lead
to a C-cast (surprisingly) requiring an AS cast (this is illustrated by
the `sret_cast_with_nonzero_alloca_as.cpp test).
The way we handle (2), by subverting CK_BitCast emission iff a sret arg
is involved, is quite naff, but I couldn't think of any other way to use
a non default indirect AS and make this case work (hopefully this is a
failure of imagination on my part).
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