Index: clang/utils/TableGen/SveEmitter.cpp =================================================================== --- clang/utils/TableGen/SveEmitter.cpp +++ clang/utils/TableGen/SveEmitter.cpp @@ -299,6 +299,7 @@ if (It != FlagTypes.end()) { uint64_t Mask = It->getValue(); unsigned Shift = llvm::countr_zero(Mask); + assert(Mask != 0 && "Invalid mask value"); return (V << Shift) & Mask; } llvm_unreachable("Unsupported flag");