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
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 :).
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) {
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104276
Andrew Pinski changed:
What|Removed |Added
Keywords||missed-optimization
Severity|