AMDGPU: Preserve vcc undef flags when inverting branch
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 7 Nov 2016 19:09:27 +0000 (19:09 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Mon, 7 Nov 2016 19:09:27 +0000 (19:09 +0000)
commit52f14ec59666c828aa5f1ab0bd09b56b338a81d3
tree995052b2fdf0c00ab1e3d088394a4eeafa490702
parent6b3a7ccc7cb6f389b25576af9844e08fb32e41d4
AMDGPU: Preserve vcc undef flags when inverting branch

If the branch was on a read-undef of vcc, passes that used
analyzeBranch to invert the branch condition wouldn't preserve
the undef flag resulting in a verifier error.

Fixes verifier failures in a future commit.

Also fix verifier error when inserting copy for vccz
corruption bug.

llvm-svn: 286133
llvm/lib/Target/AMDGPU/SIInsertWaits.cpp
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/test/CodeGen/MIR/AMDGPU/invert-br-undef-vcc.mir [new file with mode: 0644]
llvm/test/CodeGen/MIR/AMDGPU/vccz-corrupt-bug-workaround.mir [new file with mode: 0644]