Skip to content

Commit 629aebc

Browse files
[CodeGen] Use llvm::has_single_bit (NFC) (#143394)
1 parent 0f5a785 commit 629aebc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class ScoreboardHazardRecognizer : public ScheduleHazardRecognizer {
5959

6060
InstrStage::FuncUnits& operator[](size_t idx) const {
6161
// Depth is expected to be a power-of-2.
62-
assert(Depth && !(Depth & (Depth - 1)) &&
62+
assert(llvm::has_single_bit(Depth) &&
6363
"Scoreboard was not initialized properly!");
6464

6565
return Data[(Head + idx) & (Depth-1)];

0 commit comments

Comments
 (0)