From: Jakub Jelinek <jakub@redhat.com>
To: gcc@gcc.gnu.org
Subject: Combine on IA-64
Date: Tue, 26 Feb 2002 06:18:00 -0000 [thread overview]
Message-ID: <20020226145031.T2204@sunsite.ms.mff.cuni.cz> (raw)
Hi!
With the visibility patch I've noticed IA-64 generates
pretty inefficient code like:
addl r15 = @gprel(l#), gp
addl r16 = @gprel(m#), gp
;;
.mii
// cycle 1
adds r15 = 10, r15
adds r16 = 10, r16
instead of:
addl r15 = @gprel(l#+10), gp
addl r16 = @gprel(m#+10), gp
I've tried to fix this using peephole2, but that doesn't work too well,
since the two instructions aren't usually adjacent.
Now, as I understand, symbolic_operand accepts
(const (plus:DI (symbol_ref:DI ("@foo")) (const_int )))
just fine, so this looks like combiner inefficiency.
try_combine for:
i2:
(insn 9 18 12 (parallel[
(set (reg/f:DI 340)
(symbol_ref:DI ("@l")))
(clobber (reg:DI 341))
(use (reg:DI 1 r1))
] ) 5 {movdi_symbolic} (nil)
(expr_list:REG_UNUSED (reg:DI 341)
(expr_list:REG_EQUAL (symbol_ref:DI ("@l"))
(nil))))
i3:
(insn 12 9 14 (set (reg/f:DI 343)
(plus:DI (reg/f:DI 340)
(const_int 10 [0xa]))) 90 {adddi3} (insn_list 9 (nil))
(expr_list:REG_DEAD (reg/f:DI 340)
(expr_list:REG_EQUAL (const:DI (plus:DI (symbol_ref:DI ("@l"))
(const_int 10 [0xa])))
(nil))))
only attempts to recognize:
(set (reg/f:DI 343)
(const (plus:DI (symbol_ref:DI ("@l"))
(const_int 10 [0xa]))))
and not
(parallel[
(set (reg/f:DI 343)
(const (plus:DI (symbol_ref:DI ("@l"))
(const_int 10 [0xa]))))
(clobber (reg:DI 341))
(use (reg:DI 1 r1))
] )
Cannot this be special cased in try_combine (there is already some other
similar special case which fails because i3's SET_SRC is not
register but PLUS) provided the clobbers aren't mentioned between i2 and i3
and uses are not modified in between?
Jakub
next reply other threads:[~2002-02-26 13:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-26 6:18 Jakub Jelinek [this message]
2002-02-26 10:12 ` Richard Henderson
2002-02-26 10:26 ` Jakub Jelinek
2002-02-26 10:58 ` Richard Henderson
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=20020226145031.T2204@sunsite.ms.mff.cuni.cz \
--to=jakub@redhat.com \
--cc=gcc@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: link
Be 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).