These changes allow us to support sign-extending gather loads with the existing intrinsics (i.e. @llvm.aarch64.sve.ld1.gather.*).
AArch64Subtarget *Subtarget isn't used by performSVEAndCombine, so you can remove this change.
The condition Src.hasOneUse() is not in the SVEAndCombine, so you probably want to add one there as well.
- Apply suggestions from @sdesmalen (e.g. add !Src.hasOneUse() in performANDCombine)
- Removed a bunch of setOperationAction(ISD::SIGN_EXTEND_INREG, MVT::nxv2i64, Legal), which are not needed for this patch
- Simplified performSignExtendInRegCombine
- Added patterns for sext_inreg (required for the new tests vvvv)
- Added tests that verify that the new DAG Combine rules are not used when the result of gather load has multiple uses