LGTM. Thanks! ================ Comment at: lib/Transforms/Scalar/IndVarSimplify.cpp:847 @@ +846,3 @@ + return SE->getMulExpr(LHS, RHS); + return nullptr; +} ---------------- I recommend using llvm_unreachable here. The caller can't handle a null return value, and this function should never be called with any other opcode. http://reviews.llvm.org/D4695