From df27aa8c89ce96f7b01a0919697b0ea1505c01f3 Mon Sep 17 00:00:00 2001 From: Kyle Butt Date: Tue, 10 Jan 2017 23:04:30 +0000 Subject: CodeGen: Allow small copyable blocks to "break" the CFG. When choosing the best successor for a block, ordinarily we would have preferred a block that preserves the CFG unless there is a strong probability the other direction. For small blocks that can be duplicated we now skip that requirement as well. Differential revision: https://reviews.llvm.org/D27742 llvm-svn: 291609 --- llvm/test/CodeGen/AMDGPU/skip-if-dead.ll | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'llvm/test/CodeGen/AMDGPU/skip-if-dead.ll') diff --git a/llvm/test/CodeGen/AMDGPU/skip-if-dead.ll b/llvm/test/CodeGen/AMDGPU/skip-if-dead.ll index 60cee7a3499..23b67534440 100644 --- a/llvm/test/CodeGen/AMDGPU/skip-if-dead.ll +++ b/llvm/test/CodeGen/AMDGPU/skip-if-dead.ll @@ -263,18 +263,25 @@ exit: ; CHECK-NEXT: s_endpgm ; CHECK: [[KILLBB:BB[0-9]+_[0-9]+]]: -; CHECK-NEXT: s_cbranch_scc0 [[PHIBB:BB[0-9]+_[0-9]+]] +; CHECK-NEXT: s_cbranch_scc1 [[BB8:BB[0-9]+_[0-9]+]] -; CHECK: [[PHIBB]]: ; CHECK: v_cmp_eq_f32_e32 vcc, 0, [[PHIREG]] -; CHECK-NEXT: s_cbranch_vccz [[ENDBB:BB[0-9]+_[0-9]+]] +; CHECK-NEXT: s_cbranch_vccnz [[BB10:BB[0-9]+_[0-9]+]] +; CHECK-NEXT: s_branch [[END:BB[0-9]+_[0-9]+]] -; CHECK: ; %bb10 +; CHECK [[BB8]]: ; %BB8 +; CHECK: v_mov_b32_e32 v{{[0-9]+}}, 8 +; CHECK: buffer_store_dword +; CHECK: v_cmp_eq_f32_e32 vcc, 0, [[PHIREG]] +; CHECK-NEXT: s_cbranch_vccz [[END]] + +; CHECK: [[BB10]]: ; %bb10 ; CHECK: v_mov_b32_e32 v{{[0-9]+}}, 9 ; CHECK: buffer_store_dword -; CHECK: [[ENDBB]]: +; CHECK: [[END:BB[0-9]+_[0-9]+]]: ; %end ; CHECK-NEXT: s_endpgm + define amdgpu_ps void @phi_use_def_before_kill() #0 { bb: %tmp = fadd float undef, 1.000000e+00 -- cgit v1.2.3