You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The semantics of br_if are such that we branch to the consequent on a non-zero condition value and the alternative on a zero condition value. Often we are emitting x64 instructions to to the op and then explicitly test whether the result is zero or non-zero and branch accordingly. However, for many ops we can instead just do some kind of test/compare on a and b directly, instead of the op and then a non-zero test.
I think that we can add special cases for br_if(op(a, b)) for all ops in {iadd, isub, bor, bxor}. Maybe more. (Note that we already have a br_if(band(a, b)) special case).
Note that doing this might require some additional refactorings in the x64 assembler library and its ISLE constructor generation: #11122 (comment)
Activity
Cranelift: x64: branch on the flags of `iadd`, `isub`, `bor` and `bxo…