DirectXShaderCompiler icon indicating copy to clipboard operation
DirectXShaderCompiler copied to clipboard

[SER] Improve `MakeNop` HL lowering of `HitObject` default ctor

Open simoll opened this issue 1 year ago • 1 comments

There are two producers of DxHitObject_MakeNop calls atm, the direct HLSL call and the HitObject default ctor. The return type of the HL operation is either HitObject or void depending on who produced the call.

This ambiguity should be resolved, as "Having the same high level op have two different formulations is bad, and you can see in the IR for your test that the return value gets dropped and never used." (Originally posted by @llvm-beanz in https://github.com/microsoft/DirectXShaderCompiler/pull/7262#discussion_r2044700846)

simoll avatar Apr 16 '25 04:04 simoll

@simoll and I discussed this and I think we came to a reasonable solution (even if it isn't 100% ideal). Closing since I think we're good here.

llvm-beanz avatar Apr 16 '25 14:04 llvm-beanz