From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31261 invoked by alias); 16 Jan 2014 08:11:08 -0000 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 Received: (qmail 31245 invoked by uid 89); 16 Jan 2014 08:11:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f172.google.com Received: from mail-ob0-f172.google.com (HELO mail-ob0-f172.google.com) (209.85.214.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 16 Jan 2014 08:11:06 +0000 Received: by mail-ob0-f172.google.com with SMTP id vb8so2415190obc.3 for ; Thu, 16 Jan 2014 00:11:04 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.60.144.228 with SMTP id sp4mr5655755oeb.29.1389859864292; Thu, 16 Jan 2014 00:11:04 -0800 (PST) Received: by 10.182.137.136 with HTTP; Thu, 16 Jan 2014 00:11:04 -0800 (PST) In-Reply-To: <1389791978.5729.776.camel@otta> References: <1389791978.5729.776.camel@otta> Date: Thu, 16 Jan 2014 08:11:00 -0000 Message-ID: Subject: Re: : [PATCH, reginfo.c, i386.c] Backport fix for PR58139 to 4.8 From: Uros Bizjak To: Peter Bergner Cc: "gcc-patches@gcc.gnu.org" , Richard Biener , Jakub Jelinek , Vladimir Makarov , Richard Henderson , Jan Hubicka Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2014-01/txt/msg00952.txt.bz2 On Wed, Jan 15, 2014 at 2:19 PM, Peter Bergner wrote: > Oops, forgot to CC the x86 maintainers. Is the i386.c change ok for 4.8? > > Peter > > > -------- Forwarded Message -------- > From: Peter Bergner > To: gcc-patches@gcc.gnu.org > Cc: Richard Biener , Jakub Jelinek , Vladimir Makarov > Subject: [PATCH, reginfo.c, i386.c] Backport fix for PR58139 to 4.8 > Date: Tue, 14 Jan 2014 11:22:13 -0600 > > The mainline fix for PR58139 which is a wrong code gen bug was > submitted here: > > http://gcc.gnu.org/ml/gcc-patches/2013-08/msg00910.html > > and approved for mainline and 4.8 (after a few weeks) here: > > http://gcc.gnu.org/ml/gcc-patches/2013-09/msg00134.html > > However, my fix exposed a latent x86 bug, so this patch was never > committed to 4.8. The latent x86 bug was fixed by Honza and I'd > like to now ask to be able to backport my fix for PR58139 along > with Honza's fix to 4.8. > > This passed bootstrap and regtesting on powerpc64-linux and > I bootstrapped this on x86_64 and verified that the ICE seen > when compiling the test case with only my patch in: > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58269#c2 > > is fixed when we add Honza's patch. Ok for 4.8? > > Peter > > > Backport from mainline > 2013-09-06 Jan Hubicka > > * config/i386/i386.c (ix86_hard_regno_mode_ok): AVX modes are valid > only when AVX is enabled. > > 2013-09-05 Peter Bergner > > PR target/58139 > * reginfo.c (choose_hard_reg_mode): Scan through all mode classes > looking for widest mode. OK for x86, with slight update, as suggested below. > Index: gcc/config/i386/i386.c > =================================================================== > --- gcc/config/i386/i386.c (revision 206582) > +++ gcc/config/i386/i386.c (working copy) > @@ -33944,7 +33944,7 @@ ix86_hard_regno_mode_ok (int regno, enum > are available. OImode move is available only when AVX is > enabled. */ > return ((TARGET_AVX && mode == OImode) > - || VALID_AVX256_REG_MODE (mode) > + || (TARGET_AVX && VALID_AVX256_REG_MODE (mode)) Please use VALID_AVX256_REG_OR_IO_MODE define: /* OImode move and AVX modes are available only when AVX is enabled. */ return ((TARGET_AVX && VALID_AVX256_REG_OR_OI_MODE (mode)) ... Thanks, Uros.