change else{if} to else if in AndNot

This commit is contained in:
chrisps 2022-10-20 14:56:55 -07:00 committed by GitHub
parent d8b7b3ecec
commit adc3405537
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 9 deletions

View File

@ -1872,18 +1872,16 @@ Value* HIRBuilder::AndNot(Value* value1, Value* value2) {
ASSERT_NON_FLOAT_TYPE(value1);
ASSERT_NON_FLOAT_TYPE(value2);
ASSERT_TYPES_EQUAL(value1, value2);
//only other type it can be used with is INT64_TYPE (andc)
// only other type it can be used with is INT64_TYPE (andc)
if (value1->type != VEC128_TYPE) {
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()) {
return value1;
} else {
if (value1 == value2) {
return LoadZero(value1->type);
} else if (value1->IsConstantZero()) {
return value1;
} else if (value2->IsConstantZero()) {
return value1;
}
Instr* i = AppendInstr(OPCODE_AND_NOT_info, 0, AllocValue(value1->type));
i->set_src1(value1);
i->set_src2(value2);