[PATCH][X86] Fix non-determinism in LowerVectorAllZeroTest

Adam Nemet anemet at apple.com
Sat Mar 22 15:09:29 PDT 2014


This can be observed with the old testcase of CodeGen/X86/pr12312.ll:

47c47
<       vorps   %ymm0, %ymm1, %ymm0
---
>       vorps   %ymm1, %ymm0, %ymm0
97c97
<       vorps   %ymm1, %ymm0, %ymm0
---
>       vorps   %ymm0, %ymm1, %ymm0

The vector VecIns is populated with all the values from VecInMap. This is done
while iterating VecInMap.  VecInMap uses a hash of pointer values so the
resulting order can vary depending on the memory layout.

The fix is to populate the vector VecIns earlier as VecInMap is populated.
This is done in DAG traversal order.

Fixes <rdar://problem/16398806>

Adam

-------------- next part --------------
A non-text attachment was scrubbed...
Name: X86-Fix-non-determinism-in-LowerVectorAllZeroTest.patch
Type: application/octet-stream
Size: 1477 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140322/d52f7aca/attachment.obj>


More information about the llvm-commits mailing list