This patch refines the gather/scatter cost model, but also changes the TTI function getIntrinsicInstrCost to as an additional parameter accept the instruction that is evaluated, which is needed for the gather/scatter cost evaluation.
The latter did require trivial changes in some non-ARM backends to adopt the new parameter.
Gathers can be extending, so if their result is sext or zext extended, the extend can be integrated. This ensures that in these cases the cost model looks at the type after extension and calculates the cost accordingly.
Similarly, a trunc of a value can be integrated into the scatter that stores it.