Closed rfalke closed 5 years ago
Version: ed7a3e1 Exe: https://github.com/rfalke/decompiler-subjects/blob/master/from_holdec/dmi/cfg/ia32_elf/subject.exe Output:
void intermediate_1_short_circuit_and(int param1, int param2) { int eax; // r24 eax = rand(); if ( ~(param1 == 0 || eax != param2)) { puts("both true"); } return; }
which should be:
... if (param1 != 0 && eax == param2) { ...
As of ce71635ba, the condition should now read if (!(param1 == 0 || eax != param2)). To fully resolve this, it should be sufficient to add simplification rules for DeMorgan's laws to ExpSimplifier::postModify.
if (!(param1 == 0 || eax != param2))
ExpSimplifier::postModify
Version: ed7a3e1 Exe: https://github.com/rfalke/decompiler-subjects/blob/master/from_holdec/dmi/cfg/ia32_elf/subject.exe Output:
which should be: