Bound checks not eliminated in simple cases #39220
Labels
A-LLVM
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
I-slow
Issue: Problems and improvements with respect to performance of generated code.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I've found several simple cases where bound checks do not get eliminated: https://is.gd/OMzVUa
There are four variants of the same piece of code. It baffles me why bound checks don't get eliminated in the first three functions, and they finally do in the fourth (the function compiles to noop).
Any ideas?
The text was updated successfully, but these errors were encountered: