-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect bounds check elimination #18261
Labels
compiler:inference
Type inference
Comments
I'll take a look at this next week. |
this is basically just a special case of #9765 |
Is it? The issue here is that we always need to inline return foo(...) as Expr(:inbounds, false)
SSAValue(n) = foo(...)
Expr(:inbounds, :pop)
return SSAValue(n) Unless |
yuyichao
added a commit
to yuyichao/BaseBenchmarks.jl
that referenced
this issue
Aug 19, 2017
Currently the benchmarks are relying on inlining bugs to propagate boundscheck elision but the bug will be fixed with linear IR. Ref JuliaLang/julia#18261 This is affecting JuliaLang/julia#23240
ararslan
pushed a commit
to JuliaCI/BaseBenchmarks.jl
that referenced
this issue
Aug 21, 2017
Currently the benchmarks are relying on inlining bugs to propagate boundscheck elision but the bug will be fixed with linear IR. Ref JuliaLang/julia#18261 This is affecting JuliaLang/julia#23240
yuyichao
added a commit
that referenced
this issue
Nov 5, 2017
These were previously relying on bug in the inliner. (#18261)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
IIUC,
@inbounds
should only affect one level of inlining unlesspropagate_inbounds
is specified, however, due to how inlining works, this is currently not true in certain cases.The issue here is that the
Expr(:return)
is not included when adding theinbounds
metadata during inlining. A simpler case wheref(a)
andg(a)
are not oneliner and have a simplerreturn
statement is also currently wrong on master but is fixed in #18260 (see the added test).Maybe we can just wait for fully linear IR?
The text was updated successfully, but these errors were encountered: