[AMDGPU] Make sure to fix implicit operands on insertBranch
authordstuttar <david.stuttard@amd.com>
Tue, 23 Jun 2020 16:47:58 +0000 (17:47 +0100)
committerdstuttar <david.stuttard@amd.com>
Wed, 24 Jun 2020 15:50:48 +0000 (16:50 +0100)
commite8775c8d817b7aa48bea17241f0eb459823f46b2
tree3851875c5aa67558dcb25d9e8b7ee6b7c4c2a575
parenta44867075201b6aa3355f63445d81d66ef9daa50
[AMDGPU] Make sure to fix implicit operands on insertBranch

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

Subscribers: arsenm, kzhuravl, jvesely, wdng, nhaehnle, yaxunl, tpr, t-tye, hiraditya, kerbowa, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D82459
llvm/lib/Target/AMDGPU/SIInstrInfo.cpp
llvm/test/CodeGen/AMDGPU/insert-branch-w32.mir [new file with mode: 0644]