Includes remaining cases not committed in https://reviews.llvm.org/D49574
This introduces what appear to be the first unittests for SelectionDAG. Lit tests do not directly test the problem cases in these functions, so I think unittests are easier to write and audit here.
This seems bad; the test silently fails to run if the AArch64 target isn't built?