DirectXShaderCompiler icon indicating copy to clipboard operation
DirectXShaderCompiler copied to clipboard

Fix non-determinism in Reassociate caused by address coincidences

Open lizhengxing opened this issue 1 year ago • 0 comments

This PR pulls the upstream change, Fix non-determinism in Reassociate caused by address coincidences (https://github.com/llvm/llvm-project/commit/ef8761fd3b0f0b24b7e9347ad4ae686fc9ed8f94), into DXC.

Here's the summary of the change:

Between building the pair map and querying it there are a few places that erase and create Values. It's rare but the address of these newly created Values is occasionally the same as a just-erased Value that we already have in the pair map. These coincidences should be accounted for to avoid non-determinism.

Thanks to Roman Tereshin for the test case.

This is part 6 (the last part) of the fix for #6659.

lizhengxing avatar May 31 '24 17:05 lizhengxing