diff --git a/llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h b/llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h index a70acca98a5c..727cd9abf927 100644 --- a/llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h +++ b/llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h @@ -59,7 +59,7 @@ class ScoreboardHazardRecognizer : public ScheduleHazardRecognizer { InstrStage::FuncUnits& operator[](size_t idx) const { // Depth is expected to be a power-of-2. - assert(Depth && !(Depth & (Depth - 1)) && + assert(llvm::has_single_bit(Depth) && "Scoreboard was not initialized properly!"); return Data[(Head + idx) & (Depth-1)];