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/105075] [nvptx] Generate sad insn (sum of absolute differences) Date: Mon, 28 Mar 2022 08:08:25 +0000 [thread overview] Message-ID: <bug-105075-4-U3pVvMswgX@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-105075-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105075 --- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> --- Created attachment 52693 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=52693&action=edit Demonstrator patch This patch adds: - modeling of insn sad.u32 in the .md file - peephole2 to generate it (which is incomplete, it needs some safety-checks related to using unique intermediate regs) - extra instance of peephole2 pass (otherwise, the peephole is not triggered) - extra instance of fast_rtl_dce pass (otherwise, unused intermediate insn are not cleaned up) So for the usad_2 in the test-case, we have without the patch: ... cvt.u64.u32 %r32, %r28; cvt.u64.u32 %r33, %r29; sub.u64 %r34, %r32, %r33; abs.s64 %r35, %r34; cvt.u32.u64 %r36, %r35; add.u32 %value, %r36, %r30; ... and with: ... sad.u32 %value, %r28, %r29, %r30; ...
next prev parent reply other threads:[~2022-03-28 8:08 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-03-28 7:53 [Bug target/105075] New: " vries at gcc dot gnu.org 2022-03-28 8:08 ` vries at gcc dot gnu.org [this message] 2022-03-28 8:13 ` [Bug target/105075] " vries at gcc dot gnu.org 2022-03-28 8:24 ` vries at gcc dot gnu.org 2022-03-28 9:50 ` tschwinge at gcc dot gnu.org 2022-03-28 10:15 ` rguenth at gcc dot gnu.org 2022-03-28 13:06 ` vries at gcc dot gnu.org 2022-03-28 13:15 ` rguenther at suse dot de
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-105075-4-U3pVvMswgX@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).