This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/30778] [4.3 Regression] invalid code generation for memset() with -mtune=k8
- From: "ubizjak at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Feb 2007 07:54:35 -0000
- Subject: [Bug target/30778] [4.3 Regression] invalid code generation for memset() with -mtune=k8
- References: <bug-30778-7958@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from ubizjak at gmail dot com 2007-02-25 07:54 -------
(In reply to comment #6)
> This patch however fixes one extra pasto and makes the prologue test
> unconditional - I was a bit overagressive minimizing amount of RTL produced
> that only leads to bugs in side corners.
This patch ICEs for "-O2 -march=nocona -m32" on the testcase above:
pr30778.c: In function ?init_reg_last?:
pr30778.c:21: internal compiler error: in predict_jump, at
config/i386/i386.c:13246
BTW: For -march=k8, we now generate:
movq reg_stat(%rip), %rax
movq $0, (%rax)
addq $8, %rax
movq $0, (%rax)
addq $8, %rax
movq $0, (%rax)
addq $8, %rax
movl $0, (%rax)
addq $4, %rax
movw $0, (%rax)
movb $0, 2(%rax)
ret
and previously:
movq reg_stat(%rip), %rax
movq $0, (%rax)
movq $0, 8(%rax)
movq $0, 16(%rax)
movl $0, 24(%rax)
movw $0, 28(%rax)
movb $0, 30(%rax)
ret
(I don't know if this is intentionally, just want to point it out.)
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|ubizjak at gmail dot com |unassigned at gcc dot gnu
| |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30778