How to get all opcode of the same type?

I need to find all load/ store instructions in the machine code. for this purpose, I find all the load/ store opcodes and compare the instruction opcode to them, for example:

mInst->getOpcode()== ARM::LDRi12 || mInst->getOpcode()== ARM::LDRBi12 ||
mInst->getOpcode()== ARM::LDRD || mInst->getOpcode()== ARM::LDRH ||…

to find all Load instructions. This way, I have to do many comparisons and I’m not sure if I have a complete list of store/load instructions (I found the instructions from ARMInstrInfo.cpp for ARM backend).
Is there an easier way to get all Load/Stores in the machine code?

You could use MI->mayLoad() and MI->mayStore().