Skip to content

Commit 6ad47a9

Browse files
committed
Report an error if inferScalarType returns nullptr
Which hopefully it never will!
1 parent f18d8db commit 6ad47a9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

llvm/lib/Transforms/Vectorize/VPlanVerifier.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,10 @@ bool VPlanVerifier::verifyVPBasicBlock(const VPBasicBlock *VPBB) {
198198
}
199199
for (const VPValue *V : R.definedValues()) {
200200
// Verify that recipes' operands have matching types.
201-
TypeInfo.inferScalarType(V);
201+
if (!TypeInfo.inferScalarType(V)) {
202+
errs() << "Failed to infer scalar type!\n";
203+
return false;
204+
}
202205

203206
for (const VPUser *U : V->users()) {
204207
auto *UI = dyn_cast<VPRecipeBase>(U);

0 commit comments

Comments
 (0)