Commit 2d3d0b7
authored
Rollup merge of rust-lang#61885 - scottmcm:slice-iter-len-opt, r=rkruppe,RalfJung
Help LLVM better optimize slice::Iter(Mut)::len
r? @RalfJung
I've included a codegen test that fails without this change as a demonstration of usefulness.File tree
3 files changed
+37
-4
lines changed- src
- libcore
- slice
- test/codegen
3 files changed
+37
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1607 | 1607 | | |
1608 | 1608 | | |
1609 | 1609 | | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
2998 | 2998 | | |
2999 | 2999 | | |
3000 | 3000 | | |
| 3001 | + | |
| 3002 | + | |
3001 | 3003 | | |
3002 | | - | |
3003 | 3004 | | |
3004 | 3005 | | |
| 3006 | + | |
| 3007 | + | |
| 3008 | + | |
3005 | 3009 | | |
3006 | 3010 | | |
3007 | | - | |
3008 | | - | |
| 3011 | + | |
| 3012 | + | |
| 3013 | + | |
| 3014 | + | |
| 3015 | + | |
| 3016 | + | |
| 3017 | + | |
| 3018 | + | |
| 3019 | + | |
| 3020 | + | |
| 3021 | + | |
3009 | 3022 | | |
3010 | 3023 | | |
3011 | 3024 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
0 commit comments