This is an archive of the discontinued LLVM Phabricator instance.

[SIMode] Fix typo in Status constructor
ClosedPublic

Authored by RKSimon on May 6 2019, 6:49 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

RKSimon created this revision.May 6 2019, 6:49 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 6 2019, 6:50 AM
arsenm added inline comments.May 6 2019, 7:30 AM
lib/Target/AMDGPU/SIModeRegister.cpp
47 ↗(On Diff #198267)

Should use something other than a leading underscore to disambiguate

RKSimon marked an inline comment as done.May 6 2019, 7:38 AM
RKSimon added inline comments.
lib/Target/AMDGPU/SIModeRegister.cpp
47 ↗(On Diff #198267)

No problem, its up to you - an alternative would be to write:

this->Mode &= this->Mask.
arsenm added inline comments.May 6 2019, 7:51 AM
lib/Target/AMDGPU/SIModeRegister.cpp
47 ↗(On Diff #198267)

Trailing underscore is also OK, I just don't want to be violating the reserved names rule

RKSimon updated this revision to Diff 198286.May 6 2019, 8:18 AM

Use trailing underscores

Sorry not to have noticed this sooner - I was just about to make a fix myself. I chose to change the constructor to

Status(unsigned NewMask, unsigned NewMode) : Mask(NewMask), Mode(NewMode & NewMask) {};

but your change is fine.

NewMask/NewMode it is then - thanks @timcorringham

This revision was not accepted when it landed; it landed in state Needs Review.May 8 2019, 3:22 AM
This revision was automatically updated to reflect the committed changes.