Skip to content

[DirectX] Legalize memcpy #137188

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
farzonl opened this issue Apr 24, 2025 · 1 comment · May be fixed by #139173
Open

[DirectX] Legalize memcpy #137188

farzonl opened this issue Apr 24, 2025 · 1 comment · May be fixed by #139173
Assignees

Comments

@farzonl
Copy link
Member

farzonl commented Apr 24, 2025

Problem

Currently we are emitting memcpys both 64bit and 32bit versions
The DML shaders will have errors like so:

error: Unsupported intrinsic llvm.memcpy.p3.p3.i32 for DXIL lowering

We emit this error because the memcpy intrinsic is not valid DXIL.

These memcpys tend to be in the hlsl_groupshared ie addressspace(3). This might make the memcpy more involved to serialize into a set of store calls.

Example

tail call void @llvm.memcpy.p3.p3.i32(ptr addrspace(3) align 4 %scevgep, ptr addrspace(3) align 4 %scevgep19, i32 %38, i1 false)
@damyanp
Copy link
Contributor

damyanp commented Apr 30, 2025

Look for the recent legalize memset PR to get an idea of where to start on this.

@damyanp damyanp moved this from Planning to Ready in HLSL Support Apr 30, 2025
@Icohedron Icohedron self-assigned this May 1, 2025
@Icohedron Icohedron moved this from Ready to Active in HLSL Support May 1, 2025
@Icohedron Icohedron linked a pull request May 8, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Active
Development

Successfully merging a pull request may close this issue.

3 participants