Generate OAK_NO_THROW assertions from (uint)i < (uint)a.len checks
authorMike Danes <onemihaid@hotmail.com>
Thu, 23 Feb 2017 06:45:02 +0000 (08:45 +0200)
committerMike Danes <onemihaid@hotmail.com>
Fri, 3 Mar 2017 17:16:03 +0000 (19:16 +0200)
commit18968352a63cf668a7e0592e2be8cdf6c70c995a
treee7f17fd526a18600164938fa2fba056034d12981
parent3d571832886f270ee102bf15ba5c9e590dbc57a2
Generate OAK_NO_THROW assertions from (uint)i < (uint)a.len checks

If "(uint)i < (uint)a.len" is true then we know that "i" is always within bounds and so "a[i]" does not need a range check.

Commit migrated from https://github.com/dotnet/coreclr/commit/7e04389b73e7bf593b49367543fce51da206123c
src/coreclr/src/jit/assertionprop.cpp
src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/valuenum.cpp
src/coreclr/src/jit/valuenum.h