[PATCH] D11715: WebAssembly: implement getScalarShiftAmountTy so we can shift by amount, with type

JF Bastien jfb at chromium.org
Sun Aug 2 17:00:32 PDT 2015


jfb created this revision.
jfb added subscribers: sunfish, llvm-commits.
Herald added a subscriber: jfb.

This currently sets the shift amount RHS to the same type as the LHS, and assumes that the LHS is a simple type. This isn't currently the case e.g. with weird integers sizes, but will eventually be true and will assert if not. That's what you get for having an experimental backend: break it and you get to keep both pieces. Most backends either set the RHS to MVT::i32 or MVT::i64, but WebAssembly is a virtual ISA and tries to have regular-looking binary operations where both operands are the same type (even if a 64-bit RHS shifter is slightly silly, hey it's free!).

http://reviews.llvm.org/D11715

Files:
  lib/Target/WebAssembly/WebAssemblyISelLowering.cpp
  lib/Target/WebAssembly/WebAssemblyISelLowering.h
  test/CodeGen/WebAssembly/integer64.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D11715.31211.patch
Type: text/x-patch
Size: 3359 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150803/597664b0/attachment.bin>


More information about the llvm-commits mailing list