This is an archive of the discontinued LLVM Phabricator instance.

[AMDGPU] Add implicit vcc_lo on S_CBRANCH_VCCNZ in wave32
ClosedPublic

Authored by piotr on Feb 16 2021, 8:57 AM.

Details

Summary
  • Update skip-if-dead.ll with tests for wave32.
  • Fix the crash in verifier in one newly enabled test by adding missing fixImplicitOperands in branch insertion code.
*** Bad machine code: Using an undefined physical register ***
- function:    test_kill_divergent_loop
- basic block: %bb.2 bb (0xad96308)
- instruction: S_CBRANCH_VCCNZ %bb.1, implicit $vcc_lo
- operand 1:   implicit $vcc_lo
LLVM ERROR: Found 1 machine code errors.
  • Simplify "cbranch_kill" to not use interp instructions.

Diff Detail

Event Timeline

piotr created this revision.Feb 16 2021, 8:57 AM
piotr requested review of this revision.Feb 16 2021, 8:57 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 16 2021, 8:57 AM

Commit message should be more specific

piotr retitled this revision from [AMDGPU] Fix implicit operand to [AMDGPU] Add implicit vcc_lo on S_CBRANCH_VCCNZ in wave32.Feb 16 2021, 9:12 AM
piotr edited the summary of this revision. (Show Details)

Updated commit message with more details and pasted the original error message.

arsenm accepted this revision.Feb 16 2021, 9:44 AM
This revision is now accepted and ready to land.Feb 16 2021, 9:44 AM
foad added inline comments.Feb 17 2021, 12:00 AM
llvm/test/CodeGen/AMDGPU/skip-if-dead.ll
33

You could add a WAVE64 prefix, to common up the SI and GFX10-WAVE64 checks here.

piotr updated this revision to Diff 324241.Feb 17 2021, 2:19 AM
piotr edited the summary of this revision. (Show Details)

Commoned up the SI and GFX10-WAVE64 checks.

arsenm accepted this revision.Feb 17 2021, 5:33 AM
This revision was automatically updated to reflect the committed changes.