[Bug rtl-optimization/47253] Conditional jump to tail function is not generated

2011-01-10 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47253

Zdenek Sojka  changed:

   What|Removed |Added

   Keywords||missed-optimization
  Known to fail||3.3.6, 3.4.6, 4.4.5, 4.6.0
   Severity|normal  |enhancement


[Bug rtl-optimization/47253] Conditional jump to tail function is not generated

2011-01-10 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47253

H.J. Lu  changed:

   What|Removed |Added

 CC||hjl.tools at gmail dot com

--- Comment #1 from H.J. Lu  2011-01-11 03:16:32 
UTC ---
(In reply to comment #0)
> I hope the summary is descriptive enough.
> Take the following code:
> 
> - testcase.c -
> void bar(void);
> 
> void foo(int c)
> {
> if (c) bar();
> }
..
> while better would be:
> foo:
> testedi, edi
> jne.L1
> rep # only without -Os
> ret
> 

Where is .L1?


[Bug rtl-optimization/47253] Conditional jump to tail function is not generated

2011-01-10 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47253

--- Comment #2 from Zdenek Sojka  2011-01-11 07:02:14 
UTC ---
(In reply to comment #1)
> 
> Where is .L1?

Thanks, it should be:

foo:
testedi, edi
jnebar
rep # only without -Os
ret


[Bug rtl-optimization/47253] Conditional jump to tail function is not generated

2011-01-11 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47253

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID

--- Comment #3 from H.J. Lu  2011-01-11 13:35:10 
UTC ---
jne only takes 8bit displacement.


[Bug rtl-optimization/47253] Conditional jump to tail function is not generated

2011-01-11 Thread zsojka at seznam dot cz
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47253

Zdenek Sojka  changed:

   What|Removed |Added

 Status|RESOLVED|UNCONFIRMED
 Resolution|INVALID |

--- Comment #4 from Zdenek Sojka  2011-01-11 14:04:13 
UTC ---
(In reply to comment #3)
> jne only takes 8bit displacement.

There are two opcodes for jne - 0x75 taking 8bit displacement, and 0x0f 0x85
taking 16/32bit displacement:

(pasted from IA-32 Intel Architecture Software Developer’s Manual Volume 2:
Instruction Set Reference)

75 cb
JNE rel8
Jump short if not equal (ZF=0)

0F 85 cw/cd
JNE rel16/32
Jump near if not equal (ZF=0)


Jcc is no different from JMP, both can take 8/(16/)32bit displacement - even in
64bit mode.


[Bug rtl-optimization/47253] Conditional jump to tail function is not generated

2011-01-11 Thread hjl.tools at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47253

H.J. Lu  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2011.01.11 14:09:17
 Ever Confirmed|0   |1


[Bug rtl-optimization/47253] Conditional jump to tail function is not generated

2017-10-24 Thread hjl.tools at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47253

H.J. Lu  changed:

   What|Removed |Added

 CC||peter at cordes dot ca

--- Comment #5 from H.J. Lu  ---
*** Bug 69576 has been marked as a duplicate of this bug. ***