From patchwork Mon Jun 14 17:04:22 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 55569 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 EA9EDB7D29 for ; Tue, 15 Jun 2010 03:04:40 +1000 (EST) Received: (qmail 28253 invoked by alias); 14 Jun 2010 17:04:32 -0000 Received: (qmail 28113 invoked by uid 22791); 14 Jun 2010 17:04:29 -0000 X-SWARE-Spam-Status: No, hits=-1.2 required=5.0 tests=AWL, BAYES_00, NO_DNS_FOR_FROM, TW_AV, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mga01.intel.com (HELO mga01.intel.com) (192.55.52.88) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 14 Jun 2010 17:04:24 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 14 Jun 2010 09:59:45 -0700 X-ExtLoop1: 1 Received: from gnu-6.sc.intel.com ([10.3.194.135]) by fmsmga001.fm.intel.com with ESMTP; 14 Jun 2010 10:04:00 -0700 Received: by gnu-6.sc.intel.com (Postfix, from userid 500) id A88B720F64; Mon, 14 Jun 2010 10:04:22 -0700 (PDT) Date: Mon, 14 Jun 2010 10:04:22 -0700 From: "H.J. Lu" To: gcc-patches@gcc.gnu.org Cc: Uros Bizjak Subject: PATCH: PR target/44534: _builtin_ia32_vextractf128_si256(X, N) acts as if N was always set to 1 Message-ID: <20100614170422.GA15726@intel.com> Reply-To: "H.J. Lu" MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) 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 Hi, This patch fixes a typo in AVX vec_extract_lo_* patterns. OK for trunk, 4.5 and 4.4? Thanks. H.J. --- gcc/ 2010-06-14 H.J. Lu PR target/44534 * config/i386/sse.md (vec_extract_lo_): Replace 0x1 with 0x0. (vec_extract_lo_v16hi): Likewise. (vec_extract_lo_v32qi): Likewise. gcc/testsuite/ 2010-06-14 H.J. Lu PR target/44534 * gcc.target/i386/avx-vextractf128-256-3.c: New. * gcc.target/i386/avx-vextractf128-256-4.c: Likewise. diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index d154f07..7625906 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -4213,7 +4213,7 @@ (parallel [(const_int 0) (const_int 1) (const_int 2) (const_int 3)])))] "TARGET_AVX" - "vextractf128\t{$0x1, %1, %0|%0, %1, 0x1}" + "vextractf128\t{$0x0, %1, %0|%0, %1, 0x0}" [(set_attr "type" "sselog") (set_attr "prefix_extra" "1") (set_attr "length_immediate" "1") @@ -4245,7 +4245,7 @@ (const_int 4) (const_int 5) (const_int 6) (const_int 7)])))] "TARGET_AVX" - "vextractf128\t{$0x1, %1, %0|%0, %1, 0x1}" + "vextractf128\t{$0x0, %1, %0|%0, %1, 0x0}" [(set_attr "type" "sselog") (set_attr "prefix_extra" "1") (set_attr "length_immediate" "1") @@ -4283,7 +4283,7 @@ (const_int 12) (const_int 13) (const_int 14) (const_int 15)])))] "TARGET_AVX" - "vextractf128\t{$0x1, %1, %0|%0, %1, 0x1}" + "vextractf128\t{$0x0, %1, %0|%0, %1, 0x0}" [(set_attr "type" "sselog") (set_attr "prefix_extra" "1") (set_attr "length_immediate" "1") --- /dev/null 2010-06-03 08:38:07.730259022 -0700 +++ gcc-release/gcc/testsuite/gcc.target/i386/avx-vextractf128-256-3.c 2010-06-14 09:49:51.621497536 -0700 @@ -0,0 +1,7 @@ +/* { dg-do run } */ +/* { dg-require-effective-target avx } */ +/* { dg-options "-O2 -mavx" } */ + +#define OFFSET 0 + +#include "avx-vextractf128-256-1.c" --- /dev/null 2010-06-03 08:38:07.730259022 -0700 +++ gcc-release/gcc/testsuite/gcc.target/i386/avx-vextractf128-256-4.c 2010-06-14 09:50:05.188629783 -0700 @@ -0,0 +1,7 @@ +/* { dg-do run } */ +/* { dg-require-effective-target avx } */ +/* { dg-options "-O2 -mavx" } */ + +#define OFFSET 0 + +#include "avx-vextractf128-256-2.c"