From patchwork Thu Jan 20 19:07:10 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 79752 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 2B663B70A3 for ; Fri, 21 Jan 2011 06:07:20 +1100 (EST) Received: (qmail 10206 invoked by alias); 20 Jan 2011 19:07:18 -0000 Received: (qmail 10196 invoked by uid 22791); 20 Jan 2011 19:07:18 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL, BAYES_00, NO_DNS_FOR_FROM, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 20 Jan 2011 19:07:12 +0000 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga101.jf.intel.com with ESMTP; 20 Jan 2011 11:07:10 -0800 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([10.3.194.135]) by orsmga002.jf.intel.com with ESMTP; 20 Jan 2011 11:07:10 -0800 Received: by gnu-6.sc.intel.com (Postfix, from userid 500) id 58281180E1A; Thu, 20 Jan 2011 11:07:10 -0800 (PST) Date: Thu, 20 Jan 2011 11:07:10 -0800 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Subject: Re: [x32] PATCH: PR target/47381: [x32] internal compiler error: in gen_lowpart_general, at rtlhooks.c:59 Message-ID: <20110120190710.GA20305@intel.com> Reply-To: "H.J. Lu" References: <20110120173036.GA7937@intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110120173036.GA7937@intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Thu, Jan 20, 2011 at 09:30:36AM -0800, H.J. Lu wrote: > Hi, > > Symbolic constants aren't supported by LEA for x32. I checked in this > patch to disable it. > > I missed another one. Checked it in. H.J. --- commit 89a5010b08537ed7ce7c589a057082cc049dc1c4 Author: H.J. Lu Date: Thu Jan 20 11:04:34 2011 -0800 Use x32_lea_nonmemory_operand on 64bit LEA split. diff --git a/gcc/ChangeLog.x32 b/gcc/ChangeLog.x32 index ed72339..f2f16ac 100644 --- a/gcc/ChangeLog.x32 +++ b/gcc/ChangeLog.x32 @@ -1,6 +1,12 @@ 2011-01-20 H.J. Lu PR target/47381 + * config/i386/i386.md (64bit LEA split): Replace nonmemory_operand + with x32_lea_nonmemory_operand. + +2011-01-20 H.J. Lu + + PR target/47381 * config/i386/constraints.md (Yl): New. * config/i386/i386.md (l): New. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 862dd4f..cb044df 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -6084,7 +6084,7 @@ [(set (match_operand:DI 0 "register_operand" "") (zero_extend:DI (plus:SI (match_operand:SI 1 "register_operand" "") - (match_operand:SI 2 "nonmemory_operand" "")))) + (match_operand:SI 2 "x32_lea_nonmemory_operand" "")))) (clobber (reg:CC FLAGS_REG))] "TARGET_64BIT && reload_completed && ix86_lea_for_add_ok (insn, operands)" diff --git a/gcc/testsuite/ChangeLog.x32 b/gcc/testsuite/ChangeLog.x32 index 28b6f47..371f822 100644 --- a/gcc/testsuite/ChangeLog.x32 +++ b/gcc/testsuite/ChangeLog.x32 @@ -1,6 +1,11 @@ 2011-01-20 H.J. Lu PR target/47381 + * gcc.target/i386/pr47381-3.c: New. + +2011-01-20 H.J. Lu + + PR target/47381 * gcc.target/i386/pr47381-1.c: New. * gcc.target/i386/pr47381-2.c: Likewise. diff --git a/gcc/testsuite/gcc.target/i386/pr47381-3.c b/gcc/testsuite/gcc.target/i386/pr47381-3.c new file mode 100644 index 0000000..c4b2127 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr47381-3.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -march=atom" } */ + +struct foo_t { + int limit; +} foo[3]; +void +bar () { + int i; + for (i = 0; i < 3; i++) { + __builtin_memset (&foo[i], 0, sizeof(*foo)); + } +}