Open ercoppa opened 1 year ago
I think this can be avoided by calling the symbolic helper before generating INDEX_op_setcond_i32.
I think the code was written in this was because the symbolic helper takes as input the ret
value computed by INDEX_op_setcond_i32
.
Yes, you are right. I thought the branch result is computed in the backend.
For instance, let us consider the handling of
setcond_i32
:This code first executes the concrete computation and then performs the symbolic reasoning. However, when
ret
is the same TCG temp ofarg1
orarg2
there is a problem: the concrete value ofarg1
orarg2
taken by the symbolic helper has been already updated by the concrete computation.To fix this problem, we can make a copy of
arg1
orarg2
in case of aliasing withret
to preserve the original value. Let me know if this a reasonable PR or how to improve it.