Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upCompiler fails to optimize out bounds checks on 32-bit x86 and ARM #22924
Comments
This comment has been minimized.
This comment has been minimized.
|
The problem goes away if I stick this at the start of my_write: let dst = dst; |
rprichard
referenced this issue
Mar 1, 2015
Closed
Seemingly inefficient code generated to forward a parameter to a function #22891
kmcallister
added
I-slow
A-codegen
labels
Mar 2, 2015
This comment has been minimized.
This comment has been minimized.
|
http://llvm.org/bugs/show_bug.cgi?id=22786 We could work around this by special casing slices and copying them by doing two loads/stores. Not sure if it's worth it. |
This comment has been minimized.
This comment has been minimized.
|
@dotdash should obviously be fixed upstream, will help more than just use I assume. |
cmr
self-assigned this
Mar 25, 2015
dotdash
added a commit
to dotdash/rust
that referenced
this issue
Jun 18, 2015
dotdash
referenced this issue
Jun 18, 2015
Merged
Pass fat pointers in two immediate arguments #26411
dotdash
added a commit
to dotdash/rust
that referenced
this issue
Jun 19, 2015
dotdash
added a commit
to dotdash/rust
that referenced
this issue
Jun 20, 2015
bors
added a commit
that referenced
this issue
Jun 20, 2015
dotdash
added a commit
to dotdash/rust
that referenced
this issue
Jun 20, 2015
bors
added a commit
that referenced
this issue
Jun 20, 2015
bors
closed this
in
#26411
Jun 20, 2015
jroesch
added a commit
to jroesch/rust
that referenced
this issue
Jul 21, 2015
thepowersgang
added a commit
to thepowersgang/rust
that referenced
this issue
Jul 25, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rprichard commentedMar 1, 2015
Test case:
The 32-bit x86 and ARM disassembly for
my_writeincludes two checks of the slice length and a call topanic_bounds_check. The bounds check is optimized away on x86_64.Here's the x86 assembly:
LLVM bitcode:
Compiler version:
My ARM compiler is older -- 2015-02-18 or so.