-
Notifications
You must be signed in to change notification settings - Fork 14.9k
Closed
Labels
TBAAType-Based Alias Analysis / Strict AliasingType-Based Alias Analysis / Strict AliasingbugzillaIssues migrated from bugzillaIssues migrated from bugzillaloopoptimmissed-optimization
Description
Bugzilla Link | 52143 |
Version | trunk |
OS | Linux |
Reporter | LLVM Bugzilla Contributor |
CC | @davidbolvansky,@DMG862,@dwblaikie,@fhahn |
Extended Description
clang at -O2 missed opportunity to generate memset for
unsigned** a;
void foo( int max )
{
for (int i = 0; i <= max; ++i)
{
a[i] = 0;
}
}
and left the loop, while gcc succeeded to do this:
X86-64 https://godbolt.org/z/oK59vf66n
AArch64 https://godbolt.org/z/G53W1vz7W
Metadata
Metadata
Assignees
Labels
TBAAType-Based Alias Analysis / Strict AliasingType-Based Alias Analysis / Strict AliasingbugzillaIssues migrated from bugzillaIssues migrated from bugzillaloopoptimmissed-optimization