[Bug c++/109443] missed optimization of std::vector access (Related to issue 35269)

2023-06-15 Thread hiraditya at msn dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109443 --- Comment #17 from AK --- Even after vector::size() is hoisted, the codegen is sub-optimal compared to iterator version. ``` void use_idx_const_size(std::vector v) { auto s = v.size(); for (std::vector::size_type i = 0; i < s; i++)

[Bug c++/109443] missed optimization of std::vector access (Related to issue 35269)

2023-04-13 Thread rguenther at suse dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109443 --- Comment #16 from rguenther at suse dot de --- On Thu, 13 Apr 2023, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109443 > > Jakub Jelinek changed: > >What|Removed

[Bug c++/109443] missed optimization of std::vector access (Related to issue 35269)

2023-04-13 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109443 Jakub Jelinek changed: What|Removed |Added CC||redi at gcc dot gnu.org --- Comment

[Bug c++/109443] missed optimization of std::vector access (Related to issue 35269)

2023-04-13 Thread rguenther at suse dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109443 --- Comment #14 from rguenther at suse dot de --- On Thu, 13 Apr 2023, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109443 > > --- Comment #13 from Jakub Jelinek --- > (In reply to Richard Biener from

[Bug c++/109443] missed optimization of std::vector access (Related to issue 35269)

2023-04-13 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109443 --- Comment #13 from Jakub Jelinek --- (In reply to Richard Biener from comment #12) > Note maybe the restrict qualification isn't the best representation since > it doesn't capture the value will die upon function return (does it? I > gues

[Bug c++/109443] missed optimization of std::vector access (Related to issue 35269)

2023-04-13 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109443 --- Comment #12 from Richard Biener --- (In reply to Jakub Jelinek from comment #11) > And I don't see any code generation changes on the #c0 testcase with added > #include with the patch. Yes, that's because we cannot disambiguate the call

[Bug c++/109443] missed optimization of std::vector access (Related to issue 35269)

2023-04-13 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109443 --- Comment #11 from Jakub Jelinek --- And I don't see any code generation changes on the #c0 testcase with added #include with the patch.

[Bug c++/109443] missed optimization of std::vector access (Related to issue 35269)

2023-04-13 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109443 --- Comment #10 from Jakub Jelinek --- Making the reference types to return or parameter non-POD types passed by value restrict could be --- gcc/cp/call.cc.jj 2023-03-30 09:34:05.609725768 +0200 +++ gcc/cp/call.cc 2023-04-13

[Bug c++/109443] missed optimization of std::vector access (Related to issue 35269)

2023-04-13 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109443 --- Comment #9 from Jonathan Wakely --- No: This elision of copy/move operations, called copy elision, is permitted in the following circumstances (which may be combined to eliminate multiple copies): — in a return statement in a function

[Bug c++/109443] missed optimization of std::vector access (Related to issue 35269)

2023-04-13 Thread rguenther at suse dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109443 --- Comment #8 from rguenther at suse dot de --- On Wed, 12 Apr 2023, jakub at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109443 > > Jakub Jelinek changed: > >What|Removed

[Bug c++/109443] missed optimization of std::vector access (Related to issue 35269)

2023-04-12 Thread jakub at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109443 Jakub Jelinek changed: What|Removed |Added CC||jakub at gcc dot gnu.org,

[Bug c++/109443] missed optimization of std::vector access (Related to issue 35269)

2023-04-11 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109443 Richard Biener changed: What|Removed |Added Ever confirmed|0 |1 Last reconfirmed|