This is an archive of the discontinued LLVM Phabricator instance.

[SROA] Fix non-determinism caused by differing argument evaluation order
ClosedPublic

Authored by dstenb on Jun 10 2016, 5:21 AM.

Details

Summary

When running the provided test file with opt binaries built with gcc 5.3 respectively clang 3.9, the order of the extractvalue and gep instructions differs.

Diff Detail

Repository
rL LLVM

Event Timeline

dstenb updated this revision to Diff 60341.Jun 10 2016, 5:21 AM
dstenb retitled this revision from to [SROA] Fix non-determinism caused by differing argument evaluation order .
dstenb updated this object.
dstenb added a reviewer: chandlerc.
dstenb updated this revision to Diff 61236.Jun 20 2016, 12:49 AM
patrik.h.hagglund edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Jun 20 2016, 2:30 AM
This revision was automatically updated to reflect the committed changes.
chandlerc added inline comments.Jun 20 2016, 3:48 AM
llvm/trunk/lib/Transforms/Scalar/SROA.cpp
3113–3117

The formatting of this code is pretty egregiously outside of the standards for LLVM code (and this file). Please run clang-format over patches?

dstenb marked an inline comment as done.Jun 20 2016, 4:35 AM
dstenb added inline comments.
llvm/trunk/lib/Transforms/Scalar/SROA.cpp
3113–3117

Yes, sorry about that! Mea culpa. It is fixed in r273149.