I think it makes sense to clamp out-of-range values. Even though the C language cast is UB, there’s a fairly clear “right” thing to do, and we can do it without excessive performance penalty. Let’s follow libgcc here and saturate. http://reviews.llvm.org/D2804