This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Make sure to fix implicit operands on insertBranch
ClosedPublic

Authored by dstuttard on Jun 24 2020, 6:13 AM.

Details

Summary

Without fixImplicitOperands we may end up creating default implicit operands
that are the wrong wave size

Includes simple test that provokes insertBranch in the correct way to expose the
issue being fixed.

Change-Id: I92bdcdee9fcb7b4d91529b84e76a48ac8218483e

Diff Detail

Event Timeline

dstuttard created this revision.Jun 24 2020, 6:13 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 24 2020, 6:13 AM
arsenm added inline comments.Jun 24 2020, 6:41 AM
llvm/test/CodeGen/AMDGPU/insert-branch-w32.mir
2

wave32 is the default so you don't need the mattr

28

Can you also add a case where the undef needs to be preserved

dstuttard updated this revision to Diff 273038.Jun 24 2020, 8:32 AM

Made requested changes

dstuttard marked 2 inline comments as done.Jun 24 2020, 8:33 AM
arsenm added inline comments.Jun 24 2020, 8:42 AM
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
2274

Preexisting complaint, but this function name is bad (and we should really be defining separate wave32 instructions anyway)

arsenm accepted this revision.Jun 24 2020, 8:42 AM
This revision is now accepted and ready to land.Jun 24 2020, 8:42 AM
This revision was automatically updated to reflect the committed changes.