The if should combine br with boolean comparisons. Branching on comparisons can often be compiled more efficiently without first storing the boolean comparison result. In particular, this is true in Cairo Assembly for comparisons against 0.
We then add an optimization phase which converts br to if when possible. For example,
The
if
should combinebr
with boolean comparisons. Branching on comparisons can often be compiled more efficiently without first storing the boolean comparison result. In particular, this is true in Cairo Assembly for comparisons against 0.We then add an optimization phase which converts
br
toif
when possible. For example,would be transformed to
when
tmp[0]
is not live in the branches.