Use std::countr_zero instead of __builtin_ctz

Doesn't seem to affect codegen in these cases.
This commit is contained in:
2024-08-03 10:01:12 -07:00
parent 8f03a105bb
commit 1c41605b53
+4 -4
View File
@@ -2148,7 +2148,7 @@ bool checkMaxBetweenExclusiveImpl(Node *n, int begin, int end,
if (!mask) {
return true;
}
auto *child = self->children[__builtin_ctz(mask)];
auto *child = self->children[std::countr_zero(mask)];
const bool firstRangeOk =
!child->entryPresent || child->entry.rangeVersion <= readVersion;
uint32_t compared = 0;
@@ -2183,7 +2183,7 @@ bool checkMaxBetweenExclusiveImpl(Node *n, int begin, int end,
if (!mask) {
return true;
}
auto *child = self->children[__builtin_ctzll(mask) >> 2];
auto *child = self->children[std::countr_zero(mask) >> 2];
const bool firstRangeOk =
!child->entryPresent || child->entry.rangeVersion <= readVersion;
@@ -2223,7 +2223,7 @@ bool checkMaxBetweenExclusiveImpl(Node *n, int begin, int end,
if (!mask) {
return true;
}
auto *child = self->children[__builtin_ctz(mask)];
auto *child = self->children[std::countr_zero(mask)];
const bool firstRangeOk =
!child->entryPresent || child->entry.rangeVersion <= readVersion;
@@ -2254,7 +2254,7 @@ bool checkMaxBetweenExclusiveImpl(Node *n, int begin, int end,
if (!mask) {
return true;
}
auto *child = self->children[__builtin_ctz(mask)];
auto *child = self->children[std::countr_zero(mask)];
const bool firstRangeOk =
!child->entryPresent || child->entry.rangeVersion <= readVersion;
uint32_t compared = 0;