diff options
author | Kyle Butt <kyle+llvm@iteratee.net> | 2017-01-10 23:04:30 +0000 |
---|---|---|
committer | Kyle Butt <kyle+llvm@iteratee.net> | 2017-01-10 23:04:30 +0000 |
commit | df27aa8c89ce96f7b01a0919697b0ea1505c01f3 (patch) | |
tree | 151faba3e276de822dbdf68c5e5b8e145afe2ed6 /llvm/test/CodeGen/AMDGPU/skip-if-dead.ll | |
parent | 623270694bbdfb598d4063d0f8237c0c5d4f37ef (diff) | |
download | bcm5719-llvm-df27aa8c89ce96f7b01a0919697b0ea1505c01f3.tar.gz bcm5719-llvm-df27aa8c89ce96f7b01a0919697b0ea1505c01f3.zip |
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
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/skip-if-dead.ll')
-rw-r--r-- | llvm/test/CodeGen/AMDGPU/skip-if-dead.ll | 17 |
1 files changed, 12 insertions, 5 deletions
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 |