The actual change in this review are trivial (1 line), but I'd like a second opinion on their legality from someone familiar with the context. I *believe* that this is legal, but a confirmation would help. The semantics we're going for are: 'nonnull' is preserved when two instructions are merged iff both have it.
Also, anyone know a reason we're not merging metadata when sinking instructions but are merging when hoisting?
Yes, it looks like we should be doing this. Since this is common-code combining, I think there are no control dependency issues here (feel free to do so).