Skip to content

Commit a9e3cc7

Browse files
authored
codegen: print failure reason when verifier fails (#45642)
1 parent 329fd49 commit a9e3cc7

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/llvm-alloc-opt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1177,7 +1177,7 @@ bool AllocOpt::runOnFunction(Function &F, function_ref<DominatorTree&()> GetDT)
11771177
optimizer.initialize();
11781178
optimizer.optimizeAll();
11791179
bool modified = optimizer.finalize();
1180-
assert(!verifyFunction(F));
1180+
assert(!verifyFunction(F, &errs()));
11811181
return modified;
11821182
}
11831183

src/llvm-demote-float16.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ static bool demoteFloat16(Function &F)
335335
if (erase.size() > 0) {
336336
for (auto V : erase)
337337
V->eraseFromParent();
338-
assert(!verifyFunction(F));
338+
assert(!verifyFunction(F, &errs()));
339339
return true;
340340
}
341341
else

src/llvm-gc-invariant-verifier.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void GCInvariantVerifier::visitLoadInst(LoadInst &LI) {
118118
if (Ty->isPointerTy()) {
119119
unsigned AS = cast<PointerType>(Ty)->getAddressSpace();
120120
Check(AS != AddressSpace::CalleeRooted,
121-
"Illegal store of callee rooted value", &LI);
121+
"Illegal load of callee rooted value", &LI);
122122
}
123123
}
124124

src/llvm-julia-licm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ struct JuliaLICM : public JuliaPassContext {
284284
if (changed && SE) {
285285
SE->forgetLoopDispositions(L);
286286
}
287-
assert(!verifyFunction(*L->getHeader()->getParent()));
287+
assert(!verifyFunction(*L->getHeader()->getParent(), &errs()));
288288
return changed;
289289
}
290290
};

0 commit comments

Comments
 (0)