diff options
| author | Igor Laevsky <igmyrj@gmail.com> | 2015-05-21 13:02:14 +0000 |
|---|---|---|
| committer | Igor Laevsky <igmyrj@gmail.com> | 2015-05-21 13:02:14 +0000 |
| commit | d83f6976ba7ab752a8076fe8044aff42327b8ec5 (patch) | |
| tree | 2dad34d49850394eaebe72e39dca1a12a96c3be3 /llvm/lib/Transforms | |
| parent | af1c9dd5135ff2aba6f0334b9155c01be7403ced (diff) | |
| download | bcm5719-llvm-d83f6976ba7ab752a8076fe8044aff42327b8ec5.tar.gz bcm5719-llvm-d83f6976ba7ab752a8076fe8044aff42327b8ec5.zip | |
[RewriteStatepointsForGC] Fix debug assertion during derivable pointer rematerialization
Correct assertion would be that there is no other uses from chain we are currently cloning. It is ok to have other uses of values not from this chain.
Differential Revision: http://reviews.llvm.org/D9882
llvm-svn: 237899
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp index 06ade397cfa..1f1e745439f 100644 --- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp +++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp @@ -1944,12 +1944,12 @@ static void rematerializeLiveValues(CallSite CS, assert(LastValue); ClonedValue->replaceUsesOfWith(LastValue, LastClonedValue); #ifndef NDEBUG - // Assert that cloned instruction does not use any instructions - // other than LastClonedValue - for (auto OpValue: ClonedValue->operand_values()) { - if (isa<Instruction>(OpValue)) - assert(OpValue == LastClonedValue && - "unexpected use found in rematerialized value"); + // Assert that cloned instruction does not use any instructions from + // this chain other than LastClonedValue + for (auto OpValue : ClonedValue->operand_values()) { + assert(std::find(ChainToBase.begin(), ChainToBase.end(), OpValue) == + ChainToBase.end() && + "incorrect use in rematerialization chain"); } #endif } |

