This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU: Fixed indeterminate map iteration in SIPeepholeSDWA
ClosedPublic

Authored by tpr on Nov 27 2019, 7:17 AM.

Details

Summary

Change-Id: Ic26f915a4acb4c00ecefa9d09d7c24cec370ed06

Diff Detail

Event Timeline

tpr created this revision.Nov 27 2019, 7:17 AM
Herald added a project: Restricted Project. · View Herald TranscriptNov 27 2019, 7:17 AM

No test because by definition it was indeterminate.

Did the problem manifest in any way?

llvm/lib/Target/AMDGPU/SIPeepholeSDWA.cpp
32

Includes need to be alphabetically sorted.

tpr added a comment.Nov 27 2019, 11:21 AM

Did the problem manifest in any way?

I had a couple of big graphics shaders that generated different but still correct code due to registers being allocated in a different order, depending on whether I had some other change in the front-end compiler that only affected IR metadata, and the difference only happened on one of two machines I tried it on. I spotted it because I had a bunch of front-end compiler changes that were not supposed to affect output code, and I was testing that by compiling as much stuff as I could with before-change and after-change compilers.

tpr updated this revision to Diff 231305.Nov 27 2019, 11:45 AM

V2: Sorted includes alphabetically.

tpr marked an inline comment as done.Nov 27 2019, 11:46 AM
This revision is now accepted and ready to land.Nov 27 2019, 11:54 AM
arsenm added a comment.Dec 1 2019, 9:27 PM
In D70783#1761745, @tpr wrote:

No test because by definition it was indeterminate.

I mean if you have a test, it will detect if it were to fail on some other map implementation

This revision was automatically updated to reflect the committed changes.