[llvm] Modernize bool literals (NFC)

Identified with modernize-use-bool-literals.
This commit is contained in:
Kazu Hirata 2022-07-17 18:08:51 -07:00
parent 1dc8038dad
commit 7094ab4ee7
4 changed files with 5 additions and 5 deletions

View File

@ -204,7 +204,7 @@ static Error readInitExpr(wasm::WasmInitExpr &Expr,
if (Expr.Extended) {
Ctx.Ptr = Start;
while (1) {
while (true) {
uint8_t Opcode = readOpcode(Ctx);
switch (Opcode) {
case wasm::WASM_OPCODE_I32_CONST:

View File

@ -417,9 +417,9 @@ bool getMAIIsGFX940XDL(unsigned Opc) {
CanBeVOPD getCanBeVOPD(unsigned Opc) {
const VOPDComponentInfo *Info = getVOPDComponentHelper(Opc);
if (Info)
return {Info->CanBeVOPDX, 1};
return {Info->CanBeVOPDX, true};
else
return {0, 0};
return {false, false};
}
unsigned getVOPDOpcode(unsigned Opc) {

View File

@ -3744,7 +3744,7 @@ void BoUpSLP::reorderTopToBottom() {
unsigned Opcode0 = TE->getOpcode();
unsigned Opcode1 = TE->getAltOpcode();
// The opcode mask selects between the two opcodes.
SmallBitVector OpcodeMask(TE->Scalars.size(), 0);
SmallBitVector OpcodeMask(TE->Scalars.size(), false);
for (unsigned Lane : seq<unsigned>(0, TE->Scalars.size()))
if (cast<Instruction>(TE->Scalars[Lane])->getOpcode() == Opcode1)
OpcodeMask.set(Lane);

View File

@ -88,7 +88,7 @@ int main(int argc, char **argv) {
Pool.async([&]() { ExitOnErr(Server.Server.listen()); });
Pool.async([&]() {
while (1) {
while (true) {
DebuginfodLogEntry Entry = Log.pop();
if (VerboseLogging) {
outs() << Entry.Message << "\n";