Currently, the lowering only uses a single 64-bit MOVN/MOVZ/ORR followed by some number of MOVK instructions. But there are other possibilities: we can also use 32-bit instructions, or other logical operations. This patch adds a bunch of new two-instruction patterns.
I'm not sure how far it's worth going in this direction; these patterns do show up in real code, but they're rare. And thoroughly testing all the various paths is tricky. It's fun to write them, though. :)
I've had this sitting around on my hard drive unfinished for a while; if someone else wants to pick this up, feel free.
clang-format: please reformat the code