AMDGPU: Fix iterator error when lowering SI_END_CF
authorMatt Arsenault <Matthew.Arsenault@amd.com>
Sun, 18 Aug 2019 00:20:44 +0000 (00:20 +0000)
committerMatt Arsenault <Matthew.Arsenault@amd.com>
Sun, 18 Aug 2019 00:20:44 +0000 (00:20 +0000)
commit479f3bdb2c87838e5edd57e8bf7718f8307cf935
tree5fe63479117ddbd55691df7d581312863ff87290
parentcfdc2b9bd92bb27fd8d69a47158731e03b5ad769
AMDGPU: Fix iterator error when lowering SI_END_CF

If the instruction is the last in the block, there is no next
instruction but the iteration still needs to look at the new block.

llvm-svn: 369203
llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
llvm/test/CodeGen/AMDGPU/si-lower-control-flow.mir