[PATCH] D83507: [AssumeBundles] Fix Bug in Assume Queries
Tyker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 9 14:11:22 PDT 2020
Tyker created this revision.
Tyker added a reviewer: jdoerfert.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
this bug was causing miscompile.
now clang cant properly selfhost with -mllvm --enable-knowledge-retention
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D83507
Files:
llvm/lib/Analysis/AssumeBundleQueries.cpp
Index: llvm/lib/Analysis/AssumeBundleQueries.cpp
===================================================================
--- llvm/lib/Analysis/AssumeBundleQueries.cpp
+++ llvm/lib/Analysis/AssumeBundleQueries.cpp
@@ -179,12 +179,15 @@
if (!II || Elem.Index == AssumptionCache::ExprResultIdx)
continue;
if (RetainedKnowledge RK = getKnowledgeFromBundle(
- *II, II->bundle_op_info_begin()[Elem.Index]))
+ *II, II->bundle_op_info_begin()[Elem.Index])) {
+ if (V != RK.WasOn)
+ continue;
if (is_contained(AttrKinds, RK.AttrKind) &&
Filter(RK, II, &II->bundle_op_info_begin()[Elem.Index])) {
NumUsefullAssumeQueries++;
return RK;
}
+ }
}
return RetainedKnowledge::none();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D83507.276832.patch
Type: text/x-patch
Size: 801 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200709/4a69045b/attachment.bin>
More information about the llvm-commits
mailing list