Skip to content

[DirectX] Legalize memset #136243

Closed
Closed
@farzonl

Description

@farzonl

DML shaders a breaking because memset isn't a supported intrinsic in the backend. We need to legalize memory intrinsics like memset to create valid DXIL.

example LLVMIR we need to legalize

call void @llvm.lifetime.start.p0(i64 128, ptr nonnull %accum.i.flat) #3
call void @llvm.memset.p0.i32(ptr nonnull align 4 dereferenceable(128) %accum.i.flat, i8 0, i32 128, i1 false), !tbaa !17
...
_Z6CSMainDv3_jS_.exit:                            ; preds = %for.cond.cleanup193.i
  call void @llvm.lifetime.end.p0(i64 128, ptr nonnull %accum.i.flat) #3
  ret void

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions