This patch is a part of https://reviews.llvm.org/D48456 in an attempt to split them up. This contains the code for casting between fixed point types and other fixed point types.
The method for converting between fixed point types is based off the convert() method in APFixedPoint.
What's the plan for the other conversions (int<->fix, float<->fix)? Functions for those as well?
What about EmitScalarConversion? If it cannot handle conversions of fixed-point values it should probably be made to assert, since it will likely mess up.