public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/23448] New: .p2align before a jump instruction
@ 2005-08-17 21:44 hjl at lucon dot org
2005-08-17 21:47 ` [Bug target/23448] " hjl at lucon dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: hjl at lucon dot org @ 2005-08-17 21:44 UTC (permalink / raw)
To: gcc-bugs
Gcc 4.0 and 4.1 generate .p2align before a jump instruction. minloc1_8_r8.o
in libgfortran has codes like
movl $1, 12(%ecx)
.p2align 4,,2
jmp .L19
--
Summary: .p2align before a jump instruction
Product: gcc
Version: 4.0.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hjl at lucon dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23448
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/23448] .p2align before a jump instruction
2005-08-17 21:44 [Bug target/23448] New: .p2align before a jump instruction hjl at lucon dot org
@ 2005-08-17 21:47 ` hjl at lucon dot org
2005-08-17 21:57 ` pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hjl at lucon dot org @ 2005-08-17 21:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From hjl at lucon dot org 2005-08-17 21:46 -------
Created an attachment (id=9522)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9522&action=view)
A testcase for gcc 4.0
Here is the testcase for gcc 4.0. x.s is generated with "-O2". x86-64
has the similar problem.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23448
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/23448] .p2align before a jump instruction
2005-08-17 21:44 [Bug target/23448] New: .p2align before a jump instruction hjl at lucon dot org
2005-08-17 21:47 ` [Bug target/23448] " hjl at lucon dot org
@ 2005-08-17 21:57 ` pinskia at gcc dot gnu dot org
2005-08-17 22:00 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-17 21:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-17 21:54 -------
Not a bug, it is aligning the loop:
.L5:
incl %edx
cmpl %edx, %ecx
je .L6
incl %edx
cmpl %edx, %ecx
.p2align 4,,5
jne .L5
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23448
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/23448] .p2align before a jump instruction
2005-08-17 21:44 [Bug target/23448] New: .p2align before a jump instruction hjl at lucon dot org
2005-08-17 21:47 ` [Bug target/23448] " hjl at lucon dot org
2005-08-17 21:57 ` pinskia at gcc dot gnu dot org
@ 2005-08-17 22:00 ` pinskia at gcc dot gnu dot org
2005-08-17 23:07 ` hjl at lucon dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-17 22:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-17 21:57 -------
And next time don't attach a tar file as it is much harder to get at the testcase.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23448
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/23448] .p2align before a jump instruction
2005-08-17 21:44 [Bug target/23448] New: .p2align before a jump instruction hjl at lucon dot org
` (2 preceding siblings ...)
2005-08-17 22:00 ` pinskia at gcc dot gnu dot org
@ 2005-08-17 23:07 ` hjl at lucon dot org
2005-08-17 23:11 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: hjl at lucon dot org @ 2005-08-17 23:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From hjl at lucon dot org 2005-08-17 23:02 -------
Were you suggesting
.L5:
incl %edx
cmpl %edx, %ecx
je .L6
incl %edx
cmpl %edx, %ecx
jne .L5
was slower? Where does this information come from?
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23448
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/23448] .p2align before a jump instruction
2005-08-17 21:44 [Bug target/23448] New: .p2align before a jump instruction hjl at lucon dot org
` (3 preceding siblings ...)
2005-08-17 23:07 ` hjl at lucon dot org
@ 2005-08-17 23:11 ` pinskia at gcc dot gnu dot org
2005-08-17 23:13 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-17 23:11 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-17 23:07 -------
(note 81 50 85 NOTE_INSN_LOOP_END)
(note 85 81 105 [bb 6] NOTE_INSN_BASIC_BLOCK)
(insn 105 85 91 (unspec_volatile [
(const_int 4 [0x4])
] 68) -1 (nil)
(nil))
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23448
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/23448] .p2align before a jump instruction
2005-08-17 21:44 [Bug target/23448] New: .p2align before a jump instruction hjl at lucon dot org
` (4 preceding siblings ...)
2005-08-17 23:11 ` pinskia at gcc dot gnu dot org
@ 2005-08-17 23:13 ` pinskia at gcc dot gnu dot org
2005-08-17 23:18 ` pinskia at gcc dot gnu dot org
2005-08-18 0:42 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-17 23:13 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-17 23:11 -------
if (TARGET_FOUR_JUMP_LIMIT && optimize && !optimize_size)
ix86_avoid_jump_misspredicts ();
/* Some CPU cores are not able to predict more than 4 branch instructions in
the 16 byte window. */
const int x86_four_jump_limit = m_PPRO | m_ATHLON_K8 | m_PENT4 | m_NOCONA;
So this is not a bug.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23448
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/23448] .p2align before a jump instruction
2005-08-17 21:44 [Bug target/23448] New: .p2align before a jump instruction hjl at lucon dot org
` (5 preceding siblings ...)
2005-08-17 23:13 ` pinskia at gcc dot gnu dot org
@ 2005-08-17 23:18 ` pinskia at gcc dot gnu dot org
2005-08-18 0:42 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-17 23:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-17 23:13 -------
The alignment is so the stupid processor (yes stupid) will not mis predict the jump.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23448
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug target/23448] .p2align before a jump instruction
2005-08-17 21:44 [Bug target/23448] New: .p2align before a jump instruction hjl at lucon dot org
` (6 preceding siblings ...)
2005-08-17 23:18 ` pinskia at gcc dot gnu dot org
@ 2005-08-18 0:42 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-18 0:42 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-17 23:53 -------
from the gcc-patches (since the archives look broken):
looking on recent copy of Intel optimization manual, it has the same
hint as AMD manual about 4 jumps per cache line.
I did SPEC run on the P4 and there is no change except for bzip2 that
improves by about 3%, that is quite expected as the scenario where 5
jumps happens to be in same window is very rare.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23448
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-08-17 23:53 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-08-17 21:44 [Bug target/23448] New: .p2align before a jump instruction hjl at lucon dot org
2005-08-17 21:47 ` [Bug target/23448] " hjl at lucon dot org
2005-08-17 21:57 ` pinskia at gcc dot gnu dot org
2005-08-17 22:00 ` pinskia at gcc dot gnu dot org
2005-08-17 23:07 ` hjl at lucon dot org
2005-08-17 23:11 ` pinskia at gcc dot gnu dot org
2005-08-17 23:13 ` pinskia at gcc dot gnu dot org
2005-08-17 23:18 ` pinskia at gcc dot gnu dot org
2005-08-18 0:42 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).