[AMDGPU] Add implicit vcc_lo on S_CBRANCH_VCCNZ in wave32
authorPiotr Sobczak <Piotr.Sobczak@amd.com>
Wed, 17 Feb 2021 09:56:29 +0000 (10:56 +0100)
committerPiotr Sobczak <Piotr.Sobczak@amd.com>
Wed, 17 Feb 2021 14:14:57 +0000 (15:14 +0100)
commitc72a63b4b06a0e96cecba36f6bc8df9f8ef81cce
tree300a2f99909169ca40e6c8e5c5b75a4b3bd1c8df
parent93d9a4c95aff62bad9603029ee38faedfee40dea
[AMDGPU] Add implicit vcc_lo on S_CBRANCH_VCCNZ in wave32

* 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.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D96793
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/test/CodeGen/AMDGPU/skip-if-dead.ll