Update hir_builder.cc

This commit is contained in:
chrisps 2022-10-20 14:58:27 -07:00 committed by GitHub
parent adc3405537
commit 4493d17acc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -1877,9 +1877,7 @@ Value* HIRBuilder::AndNot(Value* value1, Value* value2) {
return this->And(this->Not(value2), value1);
} else if (value1 == value2) {
return LoadZero(value1->type);
} else if (value1->IsConstantZero()) {
return value1;
} else if (value2->IsConstantZero()) {
} else if (value1->IsConstantZero() || value2->IsConstantZero()) {
return value1;
} else {
Instr* i = AppendInstr(OPCODE_AND_NOT_info, 0, AllocValue(value1->type));