@chandlerc One important factor in the slow march to bounds check optimization is that LLVM traditionally lagged behind both GCC and research papers in optimizations based on integer range information. I'm not even sure when/how this got better, since it was after I was following LLVM closely.
@zwarich @chandlerc The newer ConstraintElim pass in LLVM made a relatively big difference in generated code quality when it comes to non-trivial bounds check elimination.