public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "vries at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/96401] [nvptx] Take advantage of subword ld/st/cvt Date: Fri, 31 Jul 2020 14:14:02 +0000 [thread overview] Message-ID: <bug-96401-4-rAqNnVOJgB@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-96401-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96401 --- Comment #3 from Tom de Vries <vries at gcc dot gnu.org> --- Note that with the proposed TARGET_TRULY_NOOP_TRUNCATION -> false change ( https://gcc.gnu.org/pipermail/gcc-patches/2020-July/549896.html ), we start out with the same ptx insns, but with the cvt.u16.u32 a truncate instead of a subreg move: ... //(insn 5 2 6 2 // (set (reg:SI 22 [ v$0_1 ]) // (mem/v/c:SI (reg/f:DI 2 %frame) [1 v+0 S4 A128])) // "test.c":7:6 6 {*movsi_insn} // (nil)) ld.u32 %r22, [%frame]; // 5 [c=4] *movsi_insn/1 //(insn 6 5 9 2 // (set (reg:HI 24 [ v$0_1 ]) // (truncate:HI (reg:SI 22 [ v$0_1 ]))) "test.c":7:6 30 {truncsihi2} // (expr_list:REG_DEAD (reg:SI 22 [ v$0_1 ]) // (nil))) cvt.u16.u32 %r24, %r22; // 6 [c=4] truncsihi2/0 //(insn 9 6 12 2 // (set (mem/v/c:HI (plus:DI (reg/f:DI 2 %frame) // (const_int 4 [0x4])) [2 v2+0 S2 A32]) // (reg:HI 24 [ v$0_1 ])) "test.c":7:6 5 {*movhi_insn} // (expr_list:REG_DEAD (reg:HI 24 [ v$0_1 ]) // (nil))) st.u16 [%frame+4], %r24; // 9 [c=4] *movhi_insn/2 ... Still, with the changes in comment 1 enabled we end up with the desired two insns, though a bit later, at cse2 (265r), and not using movhi_insn: ... (insn 9 5 0 2 (set (mem/v/c:HI (plus:DI (reg/f:DI 2 %frame) (const_int 4 [0x4])) [2 v2+0 S2 A32]) (truncate:HI (reg:SI 22 [ v$0_1 ]))) "test.c":7:6 30 {truncsihi2} (expr_list:REG_DEAD (reg:HI 24 [ v$0_1 ]) (nil))) ... so we might get this just with the nvptx_modes_tieable_p change.
prev parent reply other threads:[~2020-07-31 14:14 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-31 13:36 [Bug target/96401] New: " vries at gcc dot gnu.org 2020-07-31 13:49 ` [Bug target/96401] " vries at gcc dot gnu.org 2020-07-31 14:03 ` vries at gcc dot gnu.org 2020-07-31 14:14 ` vries at gcc dot gnu.org [this message]
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-96401-4-rAqNnVOJgB@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).