[llvm] 13ab22a - Revert "AMDGPU: Fix AMDGPUUnifyDivergentExitNodes with no normal returns"
Connor Abbott via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 29 07:15:18 PST 2020
Author: Connor Abbott
Date: 2020-01-29T16:14:49+01:00
New Revision: 13ab22ab22de7795a1e18683f018b556c1df6f1b
URL: https://github.com/llvm/llvm-project/commit/13ab22ab22de7795a1e18683f018b556c1df6f1b
DIFF: https://github.com/llvm/llvm-project/commit/13ab22ab22de7795a1e18683f018b556c1df6f1b.diff
LOG: Revert "AMDGPU: Fix AMDGPUUnifyDivergentExitNodes with no normal returns"
This reverts commit 323bfde20c5f3e63db3d6b385b394ed38542abe6.
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp
llvm/test/CodeGen/AMDGPU/kill-infinite-loop.ll
Removed:
################################################################################
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp b/llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp
index f7bd478d73e6..01bb60f07f2e 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp
@@ -195,6 +195,8 @@ static BasicBlock *unifyReturnBlockSet(Function &F,
bool AMDGPUUnifyDivergentExitNodes::runOnFunction(Function &F) {
auto &PDT = getAnalysis<PostDominatorTreeWrapperPass>().getPostDomTree();
+ if (PDT.getRoots().size() <= 1)
+ return false;
LegacyDivergenceAnalysis &DA = getAnalysis<LegacyDivergenceAnalysis>();
@@ -319,7 +321,7 @@ bool AMDGPUUnifyDivergentExitNodes::runOnFunction(Function &F) {
if (ReturningBlocks.empty())
return false; // No blocks return
- if (ReturningBlocks.size() == 1 && !InsertExport)
+ if (ReturningBlocks.size() == 1)
return false; // Already has a single return block
const TargetTransformInfo &TTI
diff --git a/llvm/test/CodeGen/AMDGPU/kill-infinite-loop.ll b/llvm/test/CodeGen/AMDGPU/kill-infinite-loop.ll
index a2358f3a80f4..30280b967ad8 100644
--- a/llvm/test/CodeGen/AMDGPU/kill-infinite-loop.ll
+++ b/llvm/test/CodeGen/AMDGPU/kill-infinite-loop.ll
@@ -45,22 +45,6 @@ end:
ret void
}
-; test the case where there's only a kill in an infinite loop
-; CHECK-LABEL: only_kill
-; CHECK: exp null off, off, off, off done vm
-; CHECK-NEXT: s_endpgm
-; SIInsertSkips inserts an extra null export here, but it should be harmless.
-; CHECK: exp null off, off, off, off done vm
-; CHECK-NEXT: s_endpgm
-define amdgpu_ps void @only_kill() #0 {
-main_body:
- br label %loop
-
-loop:
- call void @llvm.amdgcn.kill(i1 false) #3
- br label %loop
-}
-
; In case there's an epilog, we shouldn't have to do this.
; CHECK-LABEL: return_nonvoid
; CHECK-NOT: exp null off, off, off, off done vm
More information about the llvm-commits
mailing list