Skip to content

Commit 5143403

Browse files
committed
ensure switch is fully covered
1 parent f2f146f commit 5143403

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/Transforms/Scalar/LowerMatrixIntrinsics.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static bool isUniformShape(Value *V) {
234234
if (I->isBinaryOp())
235235
return true;
236236

237-
if (auto *Cast = dyn_cast<CastInst>(V))
237+
if (auto *Cast = dyn_cast<CastInst>(V)) {
238238
switch (Cast->getOpcode()) {
239239
case llvm::Instruction::Trunc:
240240
case llvm::Instruction::ZExt:
@@ -259,6 +259,8 @@ static bool isUniformShape(Value *V) {
259259
case llvm::Instruction::CastOpsEnd:
260260
llvm_unreachable("not an actual cast op");
261261
}
262+
llvm_unreachable("unhandled cast opcode");
263+
}
262264

263265
switch (I->getOpcode()) {
264266
case Instruction::FNeg:

0 commit comments

Comments
 (0)