[CodeGen] Use llvm::has_single_bit (NFC) (#143394)

This commit is contained in:
Kazu Hirata
2025-06-09 12:46:15 -07:00
committed by GitHub
parent 0f5a78516a
commit 629aebcd17

View File

@@ -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)];