This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/46186] Clang creates code running 1600 times faster than gcc's
- From: "pinskia at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 26 Oct 2010 15:56:24 +0000
- Subject: [Bug c/46186] Clang creates code running 1600 times faster than gcc's
- Auto-submitted: auto-generated
- References: <bug-46186-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46186
--- Comment #12 from pinskia at gmail dot com <pinskia at gmail dot com> 2010-10-26 15:56:20 UTC ---
On Oct 26, 2010, at 7:30 AM, "jak@jak-linux.org" <gcc-bugzilla@gcc.gnu.org
> wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46186
>
> --- Comment #1 from Julian Andres Klode <jak@jak-linux.org>
> 2010-10-26 14:30:24 UTC ---
> Created attachment 22162
> --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22162
> Clang's assember
This multiplication transformation is incorrect if the loop wraps
(unsigned always wraps; never overflows). Gcc is correct in its speed.
Though -O3 is faster but not because of multiplication but rather
constant propatagtion. So this bug is invalid and some one should
report a bug to llvm folks about this.
>
> Attaching the assembler output from clang, it should help understand
> which
> optimizations clang does (and improve gcc to do them as well).