Displaying 2 results from an estimated 2 matches for "gt_s".
Did you mean:
gt_9
2018 Jan 11
3
wasm: Bad codegen for i8 comparison
...;t see any commit that
could fix this for wasm); With the wasm backend,
%2 = icmp sgt i8 %0, -1
becomes:
i32.const $4=, 255
i32.const $2=, 255
i32.and $3=, $0, $2
i32.const $5=, 255
i32.and $6=, $4, $5
i32.gt_s $7=, $3, $6
Which essentially does (arg & 0xff) > (0xff & 0xff) (if I read it
correctly) and seems to always result in false.
Full testcase:
https://gist.github.com/carlokok/579b7793465cd0299cf4c609c569f559
2018 Jan 11
0
wasm: Bad codegen for i8 comparison
...sm); With the wasm backend,
>
>
> %2 = icmp sgt i8 %0, -1
>
> becomes:
> i32.const $4=, 255
> i32.const $2=, 255
> i32.and $3=, $0, $2
> i32.const $5=, 255
> i32.and $6=, $4, $5
> i32.gt_s $7=, $3, $6
>
> Which essentially does (arg & 0xff) > (0xff & 0xff) (if I read it
> correctly) and seems to always result in false.
>
> Full testcase:
> https://gist.github.com/carlokok/579b7793465cd0299cf4c609c569f559
> _______________________________________...