mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 20:09:46 +00:00
[AssumeBundles] Fix Bug in Assume Queries
this bug was causing miscompile. now clang cant properly selfhost with -mllvm --enable-knowledge-retention Reviewed By: jdoerfert, lebedev.ri Differential Revision: https://reviews.llvm.org/D83507
This commit is contained in:
parent
38b9cda6d0
commit
dfa36c6cdf
@ -172,12 +172,15 @@ llvm::getKnowledgeForValue(const Value *V,
|
||||
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();
|
||||
}
|
||||
|
@ -13,7 +13,10 @@ define %0* @f1() local_unnamed_addr {
|
||||
; ANY-NEXT: call void @llvm.assume(i1 true) [ "nonnull"(%0* [[I1]]) ]
|
||||
; ANY-NEXT: [[I4:%.*]] = getelementptr inbounds [[TMP0:%.*]], %0* [[I1]], i64 0, i32 0
|
||||
; ANY-NEXT: [[I5]] = load %0*, %0** [[I4]], align 8
|
||||
; ANY-NEXT: br label [[BB3]]
|
||||
; ANY-NEXT: [[I2:%.*]] = icmp eq %0* [[I5]], null
|
||||
; ANY-NEXT: br i1 [[I2]], label [[BB6:%.*]], label [[BB3]]
|
||||
; ANY: bb6:
|
||||
; ANY-NEXT: ret %0* undef
|
||||
;
|
||||
bb:
|
||||
br label %bb1
|
||||
|
Loading…
Reference in New Issue
Block a user