Merge pull request #59 from Uraniumm/canary_experimental
Add nullptr check in CheckScalarConstCmp
This commit is contained in:
commit
2f59487bf3
|
@ -796,7 +796,10 @@ bool SimplificationPass::CheckScalarConstCmp(hir::Instr* i,
|
|||
|
||||
if (var_definition) {
|
||||
var_definition = var_definition->GetDestDefSkipAssigns();
|
||||
def_opcode = var_definition->opcode->num;
|
||||
if (var_definition != NULL)
|
||||
{
|
||||
def_opcode = var_definition->opcode->num;
|
||||
}
|
||||
}
|
||||
// x == 0 -> !x
|
||||
if (cmpop == OPCODE_COMPARE_EQ && constant_unpacked == 0) {
|
||||
|
|
Loading…
Reference in New Issue