Add tests for sub as well
LGTM
It would be good to add a "negative test" comment to this set of tests (and the corresponding sub variants) in D141875.
That way, it's clear that if they get changed somehow in a subsequent patch, it's probably a miscompile.
Rebase