public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "olegendo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/53987] [SH] Unnecessary zero-extensions Date: Thu, 25 Dec 2014 01:11:00 -0000 [thread overview] Message-ID: <bug-53987-4-rdrIXQfx1X@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-53987-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53987 --- Comment #7 from Oleg Endo <olegendo at gcc dot gnu.org> --- In bzip2-1.0.2/blocksort.s there is code such as: .L294: mov.b @(4,r11),r0 extu.b r0,r11 mov.b @(4,r3),r0 extu.b r0,r3 cmp/eq r3,r11 bf .L314 mov.w @(8,r2),r0 extu.w r0,r11 mov.w @(8,r1),r0 extu.w r0,r3 cmp/eq r3,r11 bf .L314 mov r4,r13 add r6,r13 mov.b @(5,r13),r0 mov r5,r3 add r6,r3 extu.b r0,r12 mov.b @(5,r3),r0 extu.b r0,r11 cmp/eq r11,r12 bf .L313 mov.w @(10,r2),r0 extu.w r0,r12 mov.w @(10,r1),r0 extu.w r0,r11 cmp/eq r11,r12 bf .L313 mov.b @(6,r13),r0 extu.b r0,r12 mov.b @(6,r3),r0 extu.b r0,r11 cmp/eq r11,r12 bf .L313 mov.w @(12,r2),r0 extu.w r0,r12 mov.w @(12,r1),r0 extu.w r0,r11 cmp/eq r11,r12 bt .L300 .L313: cmp/hi r11,r12 bra .L308 movt r0 .L300: mov.b @(7,r13),r0 extu.b r0,r11 mov.b @(7,r3),r0 extu.b r0,r3 cmp/eq r3,r11 bt .L301 .L314: cmp/hi r3,r11 bra .L308 movt r0 In the BB at L294 the zero extensions can be omitted before the cmp/eq insns. Since the zero extended values are then compared using cmp/hi the zero extensions must be inserted there again. Sinking zero extensions for such cases will reduce the code size.
next prev parent reply other threads:[~2014-12-25 1:11 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-07-16 23:50 [Bug target/53987] New: [SH] Unnecessary zero-extension before cmp/eq olegendo at gcc dot gnu.org 2012-08-31 18:14 ` [Bug target/53987] " olegendo at gcc dot gnu.org 2013-10-29 21:58 ` olegendo at gcc dot gnu.org 2013-12-16 19:07 ` olegendo at gcc dot gnu.org 2014-12-17 21:09 ` olegendo at gcc dot gnu.org 2014-12-21 16:54 ` [Bug target/53987] [SH] Unnecessary zero-extensions olegendo at gcc dot gnu.org 2014-12-22 22:27 ` olegendo at gcc dot gnu.org 2014-12-25 1:11 ` olegendo at gcc dot gnu.org [this message] 2014-12-30 17:26 ` olegendo at gcc dot gnu.org 2015-01-15 1:37 ` olegendo at gcc dot gnu.org 2015-01-24 13:06 ` olegendo at gcc dot gnu.org 2015-01-27 23:08 ` olegendo at gcc dot gnu.org 2015-08-01 9:57 ` olegendo at gcc dot gnu.org 2015-09-09 12:15 ` olegendo at gcc dot gnu.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=bug-53987-4-rdrIXQfx1X@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).