This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU][GlobalISel] Remove redundant cmp when copying constant to vcc
ClosedPublic

Authored by mbrkusanin on Jan 27 2021, 9:25 AM.

Diff Detail

Event Timeline

mbrkusanin created this revision.Jan 27 2021, 9:25 AM
mbrkusanin requested review of this revision.Jan 27 2021, 9:25 AM
arsenm accepted this revision.Jan 27 2021, 10:09 AM
This revision is now accepted and ready to land.Jan 27 2021, 10:09 AM
This revision was landed with ongoing or failed builds.Jan 28 2021, 2:21 AM
This revision was automatically updated to reflect the committed changes.
foad added inline comments.Jan 29 2021, 8:31 AM
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
145

Is it really correct to use -1 here if the condition is true? Shouldn't it be "s_mov dst, exec(_lo)" instead?

arsenm added inline comments.Jan 29 2021, 8:35 AM
llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
145

I think it's an open question if an s1 value means a boolean anded with the correct exec mask. My current thinking is the answer is no and the uses that care are responsible for masking out exec bits