------- Comment #1 from pinskia at gcc dot gnu dot org 2008-11-04 22:48 ------- I think it depends on the tuning of the processor which decides if it should goto memory or not. -mtune=generic makes it go through memory while -mtune=core2 does not and we get: movd %edi, %xmm0 paddd LC0(%rip), %xmm0 movd %xmm0, %eax ret
Note I checking with -fPIC turned on. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38015