aboutsummaryrefslogtreecommitdiff
path: root/src/codegen
diff options
context:
space:
mode:
authordweiller <4678790+dweiller@users.noreply.github.com>2025-02-11 15:01:35 +1100
committerAndrew Kelley <andrew@ziglang.org>2025-02-11 17:40:20 -0800
commit6dc1a4db7f9561dd2b84a99159b3ad7b55958717 (patch)
treedec4044e1316dcffba1d1a2b346f307e89dd8d62 /src/codegen
parentc2a3d8cbb935ae68a5bd95d45c65b0f7f32974b0 (diff)
downloadzig-6dc1a4db7f9561dd2b84a99159b3ad7b55958717.tar.gz
zig-6dc1a4db7f9561dd2b84a99159b3ad7b55958717.zip
compiler-rt: fix memcpy generating recursive calls
When using the LLVM backend, array copies were lowered as calls to `llvm.memcpy.*` builtin which could cause recursive calls to memcpy to be generated (observed with `-target x86_64-linux -mcpu x86_64+avx512vl --debug-rt`). By instead performing these small fixed-size copies with integers or vectors the LLVM backend does not generate calls to the `llvm.memcpy` builtin, and so (with `-fno-builtin`) recursive calls to memcpy will not be generated by LLVM. The assertions and (test build) runtime safety have been removed as they may cause (mutually) recursive calls to memcpy in debug builds since the panic handler generates calls to llvm.memcpy.
Diffstat (limited to 'src/codegen')
0 files changed, 0 insertions, 0 deletions