This adds a combine for extract(x, n); extract(x, n+1) -> VMOVRRD(extract x, n/2). This allows two vector lanes to be moved at the same time in a single instruction, and thanks to the other VMOVRRD folds we have added recently can help reduce the amount of executed instructions. Floating point types are very similar, but will include a bitcast to an integer type.
This also adds a shouldRewriteCopySrc, to prevent copy propagation from DPR to SPR, which can break as not all DPR regs extracted from directly. Otherwise the machine verifier is unhappy.
This causes lots of
../../llvm/lib/Target/ARM/ARMBaseRegisterInfo.h:213:8: warning: 'shouldRewriteCopySrc' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] bool shouldRewriteCopySrc(const TargetRegisterClass *DefRC, ^ ../../llvm/include/llvm/CodeGen/TargetRegisterInfo.h:579:16: note: overridden virtual function is here virtual bool shouldRewriteCopySrc(const TargetRegisterClass *DefRC, ^ 1 warning generated.The override is likely intentional and we should just add override?