[clang] [llvm] [CaptureTracking][FunctionAttrs] Add support for CaptureInfo (PR #125880)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 20 06:49:44 PST 2025
nikic wrote:
I'm not sure whether this is related to the Windows issue or not, but I've found one miscompile in the interaction with callCapturesBefore:
```
; RUN: opt -S -passes=memcpyopt < %s
declare void @foo(ptr)
define void @test(ptr noalias writable dereferenceable(4) %p) {
%a = alloca i32
%ret = call ptr @foo(ptr %a, ptr captures(ret: address, provenance) %p) nounwind
call void @llvm.memcpy(ptr align 4 %p, ptr %a, i64 4, i1 false)
ret void
}
```
This performs call slot optimization, while it shouldn't.
https://github.com/llvm/llvm-project/pull/125880
More information about the llvm-commits
mailing list