nadav added a comment. Thanks for explaining this Elena. Have you considered handling all of the special cases by adding them to the 'TypeConversionCostTblEntry' table? Also, have you considered improving getTypeLegalizationCost? Repository: rL LLVM http://reviews.llvm.org/D15604