public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/34283] New: Non-optimal reload register used Date: Thu, 29 Nov 2007 07:27:00 -0000 [thread overview] Message-ID: <bug-34283-1649@http.gcc.gnu.org/bugzilla/> (raw) Following testcase: --cut here-- typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__)); typedef long long __v2di __attribute__ ((__vector_size__ (16))); __m128i _mm_set_epi64x (long long __q1, long long __q0) { return __extension__ (__m128i)(__v2di){ __q0, __q1 }; } --cut here-- compiles using -O2 -msse2 into: _mm_set_epi64x: movq 12(%esp), %xmm1 movhps 4(%esp), %xmm1 (1) movdqa %xmm1, %xmm0 ret insn (1) is not needed. Before reload, we have: (insn:HI 12 7 18 2 epi.c:8 (set (reg/i:V2DI 21 xmm0 [ <result> ]) (vec_concat:V2DI (mem/c/i:DI (plus:SI (reg/f:SI 16 argp) (const_int 8 [0x8])) [2 __q0+0 S8 A32]) (mem/c/i:DI (reg/f:SI 16 argp) [2 __q1+0 S8 A32]))) 1039 {vec_concatv2di} (nil)) (insn:HI 18 12 0 2 epi.c:8 (use (reg/i:V2DI 21 xmm0 [ <result> ])) -1 (nil)) For some reason reload isn't satisfied with %xmm0: Reload 0: reload_in (DI) = (mem/c/i:DI (plus:SI (reg/f:SI 7 sp) (const_int 12 [0xc])) [2 __q0+0 S8 A32]) reload_out (V2DI) = (reg/i:V2DI 21 xmm0 [ <result> ]) SSE_REGS, RELOAD_OTHER (opnum = 0) reload_in_reg: (mem/c/i:DI (plus:SI (reg/f:SI 7 sp) (const_int 12 [0xc])) [2 __q0+0 S8 A32]) reload_out_reg: (reg/i:V2DI 21 xmm0 [ <result> ]) reload_reg_rtx: (reg:V2DI 22 xmm1) The insn pattern is: [(set (match_operand:V2DI 0 "register_operand" "=Y2,?Y2,Y2,x,x,x") (vec_concat:V2DI (match_operand:DI 1 "nonimmediate_operand" " m,*y ,0 ,0,0,m") (match_operand:DI 2 "vector_move_operand" " C, C,Y2,x,m,0")))] So, reload should take into account that operand 1 should match operand 0, so %xmm0 should be used. -- Summary: Non-optimal reload register used Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ubizjak at gmail dot com GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34283
next reply other threads:[~2007-11-29 7:27 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2007-11-29 7:27 ubizjak at gmail dot com [this message] 2009-06-22 22:18 ` [Bug rtl-optimization/34283] " steven at gcc dot gnu dot org 2009-06-23 12:09 ` ubizjak at gmail dot com 2009-10-03 8:36 ` ubizjak at gmail dot com
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=bug-34283-1649@http.gcc.gnu.org/bugzilla/ \ --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).