[Bug middle-end/65855] SCEV / SCCP missing optimization: triangular numbers
rguenth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Nov 3 10:01:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65855
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|missing optimization: |SCEV / SCCP missing
|triangular numbers |optimization: triangular
| |numbers
--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
From the duplicate a related testcase:
int square(int x) {
int result = 0;
for (int i = 0; i < x; ++i)
result += x;
return result;
}
is not optimized into return x * x; while llvm can do that.
More information about the Gcc-bugs
mailing list