From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25617 invoked by alias); 7 Jun 2011 14:08:10 -0000 Received: (qmail 25609 invoked by uid 22791); 7 Jun 2011 14:08:09 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,TW_ZJ X-Spam-Check-By: sourceware.org Received: from mail-qw0-f47.google.com (HELO mail-qw0-f47.google.com) (209.85.216.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 07 Jun 2011 14:07:55 +0000 Received: by qwh5 with SMTP id 5so2438298qwh.20 for ; Tue, 07 Jun 2011 07:07:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.131.32 with SMTP id v32mr4520226qcs.35.1307455674690; Tue, 07 Jun 2011 07:07:54 -0700 (PDT) Received: by 10.229.47.78 with HTTP; Tue, 7 Jun 2011 07:07:54 -0700 (PDT) In-Reply-To: References: Date: Tue, 07 Jun 2011 14:08:00 -0000 Message-ID: Subject: Re: [PATCH, i386]: Remaining FP moves cleanups From: "H.J. Lu" To: Uros Bizjak Cc: gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-06/txt/msg00522.txt.bz2 On Tue, Jun 7, 2011 at 7:02 AM, Uros Bizjak wrote: > On Tue, Jun 7, 2011 at 3:42 PM, H.J. Lu wrote: > >>> 2011-06-05 =A0Uros Bizjak =A0 >>> >>> =A0 =A0 =A0 =A0* config/i386/i386.md (*movdf_internal_rex64) : >>> =A0 =A0 =A0 =A0Remove MODE_TI handling. =A0Remove SSE1 handling in attr= ibute "mode" >>> =A0 =A0 =A0 =A0calculation. >>> =A0 =A0 =A0 =A0(*movdf_internal_rex64) : Remove MODE_TI han= dling. >>> =A0 =A0 =A0 =A0Simplify MODE_V1DF and MODE_V2SF handling. >>> =A0 =A0 =A0 =A0(*movsf_internal): Remove x constraint from operand 1 al= ternative 7. >>> =A0 =A0 =A0 =A0Simplify MODE_SF handling. >>> >>> Patch was bootstrapped and regression tested on x86_64-pc-linux-gnuj >>> {,-m32} AVX target. Committed to mainline SVN. >>> >> >> Hi Uros, >> >> The new *movsf_internal patter has >> >> =A0[(set (match_operand:SF 0 "nonimmediate_operand" >> =A0 =A0 =A0 =A0 =A0"=3Df,m,f,?r ,?m,x,x,x,m,!*y,!m,!*y,?Yi,?r,!*Ym,!r") >> =A0 =A0 =A0 =A0(match_operand:SF 1 "general_operand" >> =A0 =A0 =A0 =A0 =A0"fm,f,G,rmF,Fr,C,x,m,x,m =A0,*y,*y ,r =A0,Yi,r =A0 ,*= Ym"))] >> ... >> =A0 =A0case 7: >> =A0 =A0case 8: >> =A0 =A0 =A0if (TARGET_AVX && REG_P (operands[0]) && REG_P (operands[1])) >> =A0 =A0 =A0 =A0return "vmovss\t{%1, %0, %0|%0, %0, %1}"; >> =A0 =A0 =A0return "%vmovss\t{%1, %0|%0, %1}"; >> >> Since 7 is store and 8 is load, >> >> if (TARGET_AVX && REG_P (operands[0]) && REG_P (operands[1])) >> >> will always be false. =A0Should we remove it? > > No, because it also handles fallthru from case 6. > > OTOH, you are right, this statement can be moved to case 6, without > the check for registers. > Like this? OK for trunk with a ChangeLog entry? Thanks. --=20 H.J. ---- diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 58de87b..a61bffb 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -3207,11 +3207,11 @@ case 6: if (get_attr_mode (insn) =3D=3D MODE_V4SF) return "%vmovaps\t{%1, %0|%0, %1}"; + else if (TARGET_AVX && REG_P (operands[0]) && REG_P (operands[1])) + return "vmovss\t{%1, %0, %0|%0, %0, %1}"; case 7: case 8: - if (TARGET_AVX && REG_P (operands[0]) && REG_P (operands[1])) - return "vmovss\t{%1, %0, %0|%0, %0, %1}"; return "%vmovss\t{%1, %0|%0, %1}"; case 9: