diff options
author | Michel Danzer <michel.daenzer@amd.com> | 2013-02-14 08:00:33 +0000 |
---|---|---|
committer | Michel Danzer <michel.daenzer@amd.com> | 2013-02-14 08:00:33 +0000 |
commit | c556fcc153a727945dbbe222a5b7c1dfce141a33 (patch) | |
tree | c2fccbbe397a82e6dc44e425d898ae35a41c50dd /lib | |
parent | d4addbe78a344a1b23a8885aa5490e706aa16064 (diff) | |
download | external_llvm-c556fcc153a727945dbbe222a5b7c1dfce141a33.zip external_llvm-c556fcc153a727945dbbe222a5b7c1dfce141a33.tar.gz external_llvm-c556fcc153a727945dbbe222a5b7c1dfce141a33.tar.bz2 |
R600/SI: Check for empty stack in SIAnnotateControlFlow::isTopOfStack
Fixes assertion failure in newly added lit test. Might just be a bandaid that
needs to be revisited.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175139 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/R600/SIAnnotateControlFlow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Target/R600/SIAnnotateControlFlow.cpp b/lib/Target/R600/SIAnnotateControlFlow.cpp index f580377..2477e2a 100644 --- a/lib/Target/R600/SIAnnotateControlFlow.cpp +++ b/lib/Target/R600/SIAnnotateControlFlow.cpp @@ -147,7 +147,7 @@ bool SIAnnotateControlFlow::doInitialization(Module &M) { /// \brief Is BB the last block saved on the stack ? bool SIAnnotateControlFlow::isTopOfStack(BasicBlock *BB) { - return Stack.back().first == BB; + return !Stack.empty() && Stack.back().first == BB; } /// \brief Pop the last saved value from the control flow stack |