wasm: Bad codegen for i8 comparison

(Currently using a build from november but I didn'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:

Hello,

Can you check whether your build includes r[317710](https://llvm.org/svn/llvm-project/llvm/trunk@317710)?

Thanks,

Dan

Hi,

thanks I missed that one. I'll update and see if that fixes it.

This completely fixes it. Thanks!