[Bug tree-optimization/104276] Fail to eliminate deadstore from vector constructor

2022-01-28 Thread Darrell.Wright at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104276 --- Comment #3 from Darrell Wright --- (In reply to Andrew Pinski from comment #2) > >clang is unable to remove the memset in code like > > I think you mean GCC there :). :) both are true. This optimization would remove the need for things

[Bug tree-optimization/104276] Fail to eliminate deadstore from vector constructor

2022-01-28 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104276 --- Comment #2 from Andrew Pinski --- >clang is unable to remove the memset in code like I think you mean GCC there :).

[Bug tree-optimization/104276] Fail to eliminate deadstore from vector constructor

2022-01-28 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104276 --- Comment #1 from Andrew Pinski --- Full testcase: #include #include #include #include #include #define SZ 4096 std::vector foo() { auto result = std::vector(SZ); int *ptr = result.data(); for (std::size_t n = 0; n < SZ; ++n) {

[Bug tree-optimization/104276] Fail to eliminate deadstore from vector constructor

2022-01-28 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104276 Andrew Pinski changed: What|Removed |Added Keywords||missed-optimization