[Bug target/23450] local functions should not sign extend results (and arguments) for speed reasons
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23450 Martin Sebor changed: What|Removed |Added CC||carrot at google dot com --- Comment #4 from Martin Sebor --- *** Bug 65010 has been marked as a duplicate of this bug. ***
[Bug target/23450] local functions should not sign extend results (and arguments) for speed reasons
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=23450 Martin Sebor changed: What|Removed |Added Last reconfirmed|2007-07-01 00:47:09 |2016-1-27 CC||msebor at gcc dot gnu.org Known to fail||4.9.3, 5.3.0, 6.0 --- Comment #3 from Martin Sebor --- Even though the generated code has changed, this is still a problem with 6.0 and in all supported versions prior to it as noted in bug 65010, for both powerpc64 and powerpc64le, where GCC emits: f: addi 3,3,1 extsw 3,3 blr g: addi 3,3,1 extsw 3,3 b f
[Bug target/23450] local functions should not sign extend results (and arguments) for speed reasons
--- Comment #2 from pinskia at gcc dot gnu dot org 2005-10-23 00:05 --- I don't have time to work on this. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|pinskia at gcc dot gnu dot |unassigned at gcc dot gnu |org |dot org Status|ASSIGNED|NEW http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23450
[Bug target/23450] local functions should not sign extend results (and arguments) for speed reasons
--- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-18 03:48 --- I will be looking into this after working a libjava patch. Note the current asm is: _f: addi r3,r3,1 extsw r3,r3 blr .align 2 .p2align 4,,15 .globl _g _g: addi r3,r3,1 extsw r3,r3 b _f This is most likely can apply to x86_64 also so if someone over there should look into it. This also applies to all non-register sized types really and 32bit. for another example: static char f(char a) __attribute__((noinline)); static char f(char a) { return a+1; } char g(char a) { return f(a+1); } (this is much worse) (at -O2 -m32): _f: addi r3,r3,1 extsb r3,r3 blr .align 2 .globl _g _g: mflr r0 addi r3,r3,1 extsb r3,r3 stw r0,8(r1) stwu r1,-80(r1) bl _f addi r1,r1,80 lwz r0,8(r1) mtlr r0 blr -- What|Removed |Added AssignedTo|unassigned at gcc dot gnu |pinskia at gcc dot gnu dot |dot org |org Status|UNCONFIRMED |ASSIGNED Ever Confirmed||1 Last reconfirmed|-00-00 00:00:00 |2005-08-18 03:48:22 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23450