i32.wrap/i64 would do what you want, provided you don't care about the upper 32 bits of the v1 and v2 values (e.g. if they just have a 1 or 0 in the least significant bit). Otherwise you'd need to do something more, such as shifting the values right by 32 bits, wrapping those to i32, anding them together, then anding the result with the result of anding the lower 32 bits of v1 and v2 (in other words, "are any of the bits in v1 and v2 set")
On Tue, Jul 11, 2017 at 12:15 PM <[email protected]> wrote: > I have this expression : (select v1 v2 (i64.and t1 t2)), when I need to > convert the i64 (i64.and t1 t2) back to i32 for the select to correctly > work. > > > What should I use to convert (i64.and t1 t2) subexpression to i32 ? Is > i32.wrap/i64 adapted for that, like : (select v1 v2 (i32.wrap/i64 > (i64.and t1 t2))) ? > > > Thanks > > > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
