This is similar to D125680, but for llvm.experimental.patchpoint (instead of llvm.experimental.stackmap).
Some test outputs changed, e.g. passing i16 65535 as a live caused:
-; CHECK-NEXT: .long -1 +; CHECK-NEXT: .long 65535
I think this is OK. I think the runtime is expected to know the true size of the constant, and the higher order bits are undefined. Under this assumption, -1 and 65535 are equivalent for a i16.
[The runtime certainly can't rely on the size field in the stackmap record, which for this constant i16 is reporting as 8 bytes long. This is particularly confusing in this instance, as the small constant field can only hold 4-bytes! This bug was not introduced by this diff]
!CN