public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "uros at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/67317] [x86] Silly code generation for _addcarry_u32/_addcarry_u64 Date: Thu, 27 Aug 2015 18:30:00 -0000 [thread overview] Message-ID: <bug-67317-4-bqAWXAdw85@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-67317-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67317 --- Comment #7 from uros at gcc dot gnu.org --- Author: uros Date: Thu Aug 27 18:29:37 2015 New Revision: 227271 URL: https://gcc.gnu.org/viewcvs?rev=227271&root=gcc&view=rev Log: PR target/67317 * config/i386/i386.md (*add<mode>3_cc): Remove insn pattern. (addqi3_cc): Ditto. (UNSPEC_ADD_CARRY): Remove. (addqi3_cconly_overflow): New expander. (*add<dwi>3_doubleword): Split to add<mode>3_cconly_overflow. Adjust for changed add<mode>3_carry. (*neg<dwi>2_doubleword): Adjust for changed add<mode>3_carry. (*sub<dwi>3_doubleword): Adjust for changed sub<mode>3_carry. (<plusminus_insn><mode>3_carry): Remove expander. (*<plusminus_insn><mode>3_carry): Split insn pattern to add<mode>3_carry and sub<mode>3_carry. (plusminus_carry_mnemonic): Remove code attribute. (add<mode>3_carry): Canonicalize insn pattern. (*addsi3_carry_zext): Ditto. (sub<mode>3_carry): Ditto. (*subsi3_carry_zext): Ditto. (adcx<mode>3): Remove insn pattern. (addcarry<mode>): New insn pattern. (subborrow<mode>): Ditto. * config/i386/i386.c (ix86_expand_strlensi_unroll_1): Use gen_addqi3_cconly_overflow instead of gen_addqi3_cc. (ix86_expand_builtin) <case IX86_BUILTIN_SBB32, case IX86_BUILTIN_SBB64, case IX86_BUILTIN_ADDCARRY32, case IX86_BUILTIN_ADDCARRY64>: Use CODE_FOR_subborrowsi, CODE_FOR_subborrowdi, CODE_FOR_addcarrysi and CODE_FOR_addcarrydi. Rewrite expander to not clobber carry flag chains. testsuite/ChangeLog: PR target/67317 * gcc.target/i386/pr67317-1.c: New test. * gcc.target/i386/pr67317-2.c: Ditto. * gcc.target/i386/pr67317-3.c: Ditto. * gcc.target/i386/pr67317-4.c: Ditto. * gcc.target/i386/adx-addcarryx32-1.c: Also scan for adcl. * gcc.target/i386/adx-addcarryx32-2.c: Also scan for adcq. Added: trunk/gcc/testsuite/gcc.target/i386/pr67317-1.c trunk/gcc/testsuite/gcc.target/i386/pr67317-2.c trunk/gcc/testsuite/gcc.target/i386/pr67317-3.c trunk/gcc/testsuite/gcc.target/i386/pr67317-4.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/i386/i386.c trunk/gcc/config/i386/i386.md trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.target/i386/adx-addcarryx32-1.c trunk/gcc/testsuite/gcc.target/i386/adx-addcarryx64-1.c
next prev parent reply other threads:[~2015-08-27 18:30 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-08-22 4:59 [Bug inline-asm/67317] New: " myriachan at gmail dot com 2015-08-22 6:14 ` [Bug inline-asm/67317] " pinskia at gcc dot gnu.org 2015-08-25 8:24 ` rguenth at gcc dot gnu.org 2015-08-25 11:10 ` [Bug target/67317] " glisse at gcc dot gnu.org 2015-08-25 12:58 ` segher at gcc dot gnu.org 2015-08-25 16:48 ` ubizjak at gmail dot com 2015-08-25 19:26 ` segher at gcc dot gnu.org 2015-08-27 8:53 ` ubizjak at gmail dot com 2015-08-27 18:30 ` uros at gcc dot gnu.org [this message] 2015-09-02 15:07 ` uros at gcc dot gnu.org 2015-09-02 15:08 ` 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-67317-4-bqAWXAdw85@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).