[RISCV] Merge the handlers for masked and unmasked segment loads/stores.

A lot of the code for the masked and unmasked is the same. This
patch adds a boolean to handle the differences so we can share
the code.

Differential Revision: https://reviews.llvm.org/D96841

GitOrigin-RevId: d4353a3101542522d226419675946ca59ab7e546
2 files changed