In B3, a constant must match the type of its use. In Air, immediates don't have type, they only have representation. A 32-bit immediate (i.e. Arg::imm) can be used either for 32-bit operations or for 64-bit operations. The only difference from a Arg::imm64 is that it requires fewer bits. In the B3->Air lowering, we have a lot of code that is effectively polymorphic over integer type. That code should still be able to use Arg::imm, and it should work even for 64-bit immediates - so long as they are representable as 32-bit immediates. Therefore, the imm() helper should happily accept either Const32Value or Const64Value. We already sort of had this with immAnyType(), but it just turns out that anyone using immAnyType() should really be using imm().
Created attachment 264337 [details] the patch
Comment on attachment 264337 [details] the patch r=me
Landed in http://trac.webkit.org/changeset/191762