[PATCH] D56867: [ValueTracking] Early out of isValidAssumeForContext if the assume and the context instruction are the same
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 17 14:29:53 PST 2019
craig.topper updated this revision to Diff 182400.
craig.topper added a comment.
With context
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56867/new/
https://reviews.llvm.org/D56867
Files:
lib/Analysis/ValueTracking.cpp
Index: lib/Analysis/ValueTracking.cpp
===================================================================
--- lib/Analysis/ValueTracking.cpp
+++ lib/Analysis/ValueTracking.cpp
@@ -543,6 +543,11 @@
return true;
}
+ // If the context instruction is this assume, we shouldn't consider it valid.
+ // Otherwise the loops below will scan forward to the end of the block.
+ if (Inv == CxtI)
+ return false;
+
// With or without a DT, the only remaining case we will check is if the
// instructions are in the same BB. Give up if that is not the case.
if (Inv->getParent() != CxtI->getParent())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56867.182400.patch
Type: text/x-patch
Size: 614 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190117/377bac97/attachment.bin>
More information about the llvm-commits
mailing list