[PATCH] [RewriteStatepointsForGC] Fix debug assertion during derivable pointer rematerialization
Igor Laevsky
igor at azulsystems.com
Wed May 20 09:48:04 PDT 2015
Hi sanjoy,
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.
REPOSITORY
rL LLVM
http://reviews.llvm.org/D9882
Files:
lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
Index: lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
===================================================================
--- lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
+++ lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
@@ -1944,12 +1944,12 @@
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
}
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9882.26155.patch
Type: text/x-patch
Size: 1140 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150520/7d915736/attachment.bin>
More information about the llvm-commits
mailing list