public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "danglin at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/44632] [4.4/4.5/4.6 regression] wrong code for complex division Date: Sat, 07 Aug 2010 19:52:00 -0000 [thread overview] Message-ID: <20100807195211.1851.qmail@sourceware.org> (raw) In-Reply-To: <bug-44632-11764@http.gcc.gnu.org/bugzilla/> ------- Comment #2 from danglin at gcc dot gnu dot org 2010-08-07 19:52 ------- With slightly modified test, #include <complex> #include <iostream> void g(std::complex<double> x) { std::cout << x << std::endl; } void f(std::complex<double> x) { g (x); x = 1.0 / x; g (x); } int main() { f(2.0); } it appears RTL is wrong at expansion: ;; x.1 = std::operator/<double> (&D.24646, &x.1); [return slot optimization] (insn 18 17 19 (set (reg:SI 102) (plus:SI (reg/f:SI 90 virtual-stack-vars) (const_int 8 [0x8]))) test.cxx:12 -1 (nil)) (insn 19 18 20 (set (reg:SI 103) (plus:SI (reg/f:SI 90 virtual-stack-vars) (const_int 8 [0x8]))) test.cxx:12 -1 (nil)) (insn 20 19 21 (set (reg:SI 28 %r28) (reg:SI 103)) test.cxx:12 -1 (nil)) (insn 21 20 22 (set (reg:SI 26 %r26) (reg/f:SI 90 virtual-stack-vars)) test.cxx:12 -1 (nil)) (insn 22 21 23 (set (reg:SI 25 %r25) (reg:SI 102)) test.cxx:12 -1 (nil)) (call_insn 23 22 0 (parallel [ (call (mem:SI (symbol_ref/v/i:SI ("@_ZStdvIdESt7complexIT_ERKS1_RKS2_") [flags 0x1] <function_decl 0x40f5d600 operator/>) [0 S4 A32]) (const_int 16 [0x10])) (clobber (reg:SI 1 %r1)) (clobber (reg:SI 2 %r2)) (use (const_int 0 [0])) ]) test.cxx:12 -1 (nil) (expr_list:REG_DEP_TRUE (use (reg:SI 25 %r25)) (expr_list:REG_DEP_TRUE (use (reg:SI 26 %r26)) (expr_list:REG_DEP_TRUE (use (reg:SI 28 %r28)) (nil))))) -- danglin at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Component|target |tree-optimization http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44632
next prev parent reply other threads:[~2010-08-07 19:52 UTC|newest] Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-06-22 13:58 [Bug target/44632] New: " doko at ubuntu dot com 2010-06-22 14:30 ` [Bug target/44632] " rguenth at gcc dot gnu dot org 2010-06-24 22:03 ` rguenth at gcc dot gnu dot org 2010-08-07 19:14 ` danglin at gcc dot gnu dot org 2010-08-07 19:33 ` danglin at gcc dot gnu dot org 2010-08-07 19:52 ` danglin at gcc dot gnu dot org [this message] 2010-08-07 19:58 ` [Bug tree-optimization/44632] " danglin at gcc dot gnu dot org 2010-08-07 19:59 ` dave at hiauly1 dot hia dot nrc dot ca 2010-08-07 20:37 ` rguenth at gcc dot gnu dot org 2010-08-07 20:39 ` rguenth at gcc dot gnu dot org 2010-08-07 20:40 ` rguenth at gcc dot gnu dot org 2010-08-07 20:57 ` dave at hiauly1 dot hia dot nrc dot ca 2010-08-07 21:00 ` dave at hiauly1 dot hia dot nrc dot ca 2010-08-07 21:04 ` dave at hiauly1 dot hia dot nrc dot ca 2010-08-07 21:16 ` rguenth at gcc dot gnu dot org 2010-08-07 21:36 ` dave at hiauly1 dot hia dot nrc dot ca 2010-08-09 11:35 ` dave at hiauly1 dot hia dot nrc dot ca 2010-08-09 11:37 ` dave at hiauly1 dot hia dot nrc dot ca 2010-08-09 11:44 ` dave at hiauly1 dot hia dot nrc dot ca 2010-08-09 11:51 ` rguenther at suse dot de 2010-08-09 13:18 ` rguenth at gcc dot gnu dot org 2010-08-09 13:31 ` [Bug tree-optimization/44632] [4.4/4.5 " rguenth at gcc dot gnu dot org 2010-08-16 20:18 ` danglin at gcc dot gnu dot org 2010-08-16 20:25 ` danglin at gcc dot gnu dot org 2010-08-16 20:27 ` danglin at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20100807195211.1851.qmail@sourceware.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).