summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp
diff options
context:
space:
mode:
authorRhys Perry <pendingchaos02@gmail.com>2019-01-07 15:52:28 +0000
committerRhys Perry <pendingchaos02@gmail.com>2019-01-07 15:52:28 +0000
commitf77e2e84066779e7124208370006fecd997807f3 (patch)
treeb3f8d0420d4fae0db0c21410cb7ca48d39165b8a /llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp
parentf2001aa74394885dc178c5997b83687acb4f55e4 (diff)
downloadbcm5719-llvm-f77e2e84066779e7124208370006fecd997807f3.tar.gz
bcm5719-llvm-f77e2e84066779e7124208370006fecd997807f3.zip
AMDGPU: test for uniformity of branch instruction, not its condition
Summary: If a divergent branch instruction is marked as divergent by propagation rule 2 in DivergencePropagator::exploreSyncDependency() and its condition is uniform, that branch would incorrectly be assumed to be uniform. Reviewers: arsenm, tstellar Reviewed By: arsenm Subscribers: kzhuravl, jvesely, wdng, nhaehnle, yaxunl, dstuttard, tpr, t-tye, llvm-commits Differential Revision: https://reviews.llvm.org/D56331 llvm-svn: 350532
Diffstat (limited to 'llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp')
-rw-r--r--llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp b/llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp
index 90f430d5ca4..98e9ea66232 100644
--- a/llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp
+++ b/llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp
@@ -155,7 +155,7 @@ bool SIAnnotateControlFlow::doInitialization(Module &M) {
/// Is the branch condition uniform or did the StructurizeCFG pass
/// consider it as such?
bool SIAnnotateControlFlow::isUniform(BranchInst *T) {
- return DA->isUniform(T->getCondition()) ||
+ return DA->isUniform(T) ||
T->getMetadata("structurizecfg.uniform") != nullptr;
}
OpenPOWER on IntegriCloud