[IVDescriptors] Call getOpcode on demand in getReductionOpChain. nfc (#118777)
Non-arithmetic reductions do not require the binary opcodes.
As a first step toward removing the dependency of non-arithmetic
reductions on `getOpcode` function, this patch refactors the
`getReductionOpChain` function.
In the future, once all users of `getOpcode` function are refactored, an
assertion can be added to `getOpcode` function to ensure that only
arithmetic reductions rely on it.