This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug rtl-optimization/50030] sin optimized in sinf at -O2
- From: "vincenzo.innocente at cern dot ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 09 Aug 2011 20:08:55 +0000
- Subject: [Bug rtl-optimization/50030] sin optimized in sinf at -O2
- Auto-submitted: auto-generated
- References: <bug-50030-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50030
vincenzo Innocente <vincenzo.innocente at cern dot ch> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Regression: sin optimized |sin optimized in sinf at
|in sinf at -O2 |-O2
--- Comment #2 from vincenzo Innocente <vincenzo.innocente at cern dot ch> 2011-08-09 20:08:55 UTC ---
sorry, the "regression" is in my benchmark that suddenly showed identical
timing for "sin" and "sinf"
while I was actually testing "sinl" and NOT "sin". I was also using -std=c++0x
that apparently preserved sinl(float)
so prior to 4.7 (at least 4.6.1)
float sind(float x) {
return sinl(x);
}
compiled with c++ -O2 -c expd.cc -std=c++0x produced
40: 48 83 ec 28 sub $0x28,%rsp
44: c5 fa 11 44 24 18 vmovss %xmm0,0x18(%rsp)
4a: d9 44 24 18 flds 0x18(%rsp)
4e: db 3c 24 fstpt (%rsp)
51: e8 00 00 00 00 callq 56 <sind(float)+0x16>
52: R_X86_64_PC32 sinl-0x4
56: d9 5c 24 1c fstps 0x1c(%rsp)
5a: c5 fa 10 44 24 1c vmovss 0x1c(%rsp),%xmm0
60: 48 83 c4 28 add $0x28,%rsp
64: c3 retq
65: 66 66 2e 0f 1f 84 00 nopw %cs:0x0(%rax,%rax,1)
6c: 00 00 00 00
now not anymore. I agree this is not a real regression.
still remains that sin and exp behaves differently when a float argument is
passed