From patchwork Mon Jul 30 11:54:53 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramana Radhakrishnan X-Patchwork-Id: 10358 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id D667723E02 for ; Mon, 30 Jul 2012 11:54:55 +0000 (UTC) Received: from mail-gh0-f180.google.com (mail-gh0-f180.google.com [209.85.160.180]) by fiordland.canonical.com (Postfix) with ESMTP id A325BA1831A for ; Mon, 30 Jul 2012 11:54:55 +0000 (UTC) Received: by mail-gh0-f180.google.com with SMTP id z12so4585867ghb.11 for ; Mon, 30 Jul 2012 04:54:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :mime-version:date:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=HWTNXSmPGa4oRT5YFXCQY+uQBEVTAoGaQVfc9xmSOos=; b=OesJxmTvMMojG31rA14JzFCKxvMFd9wYeYeHBbXf4m0tBVnlRD8hLbe2a6t/y4R7p8 R+sQsmH8Wz7ai3IQFyro8WYAjo7bCdn2x+6WgY4VEXvDBoHJW2AnL8VOlTEnnYowaGLe v9JkJWo5vCB/eExjsevLD+ZEgr5xQE83wa9y0ujN3IgB23SQk1gMC9qn5JFYENqVaeua CUbOfXA/rMVNVahVy5Ksnfiajl28on6xF9I0f2fGEMGbBGv/wZBS06stiWplD1oJixSD QVBcMv2sP/Q6nDSc4qNyGS7DYVxVarJFYo+XWQHtJAtGS0LF96wszMr3YYEY9FBGrwB2 +8HQ== Received: by 10.50.219.226 with SMTP id pr2mr8029456igc.51.1343649295241; Mon, 30 Jul 2012 04:54:55 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.87.40 with SMTP id u8csp84286igz; Mon, 30 Jul 2012 04:54:54 -0700 (PDT) Received: by 10.220.221.131 with SMTP id ic3mr10682214vcb.46.1343649294519; Mon, 30 Jul 2012 04:54:54 -0700 (PDT) Received: from mail-vb0-f50.google.com (mail-vb0-f50.google.com [209.85.212.50]) by mx.google.com with ESMTPS id fa5si6525878vdb.109.2012.07.30.04.54.54 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 30 Jul 2012 04:54:54 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of ramana.radhakrishnan@linaro.org) client-ip=209.85.212.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.50 is neither permitted nor denied by best guess record for domain of ramana.radhakrishnan@linaro.org) smtp.mail=ramana.radhakrishnan@linaro.org Received: by vbal1 with SMTP id l1so5506017vba.37 for ; Mon, 30 Jul 2012 04:54:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.176.195 with SMTP id ck3mr9362271vdc.92.1343649293905; Mon, 30 Jul 2012 04:54:53 -0700 (PDT) Received: by 10.58.210.194 with HTTP; Mon, 30 Jul 2012 04:54:53 -0700 (PDT) Date: Mon, 30 Jul 2012 12:54:53 +0100 Message-ID: Subject: [Patch ARM 6/6] Fix ICE with vst1_lanedi type intrinsics. From: Ramana Radhakrishnan To: gcc-patches@gcc.gnu.org Cc: Patch Tracking , Richard Earnshaw X-Gm-Message-State: ALoCoQl9oI5aRDsbRaXfo2f5LVGnYPCjWsjhTR1K0gYEzPqom4/cBYbGVvPLXol7aUROjrg/JdBd Hi, This is similar to the previous patch except that it prevents (vec_select:DI (operand:DI)) type operations. Exposed by the vst*_lane*.c tests in the new testsuite. regards, Ramana 2012-07-27 Ramana Radhakrishnan * config/arm/neon.md (neon_vst1_lanedi): Split from .. (neon_vst1 VDX): this, iterate over VD and cleanup. --- gcc/config/arm/neon.md | 26 +++++++++++++++++--------- 1 files changed, 17 insertions(+), 9 deletions(-) diff --git a/gcc/config/arm/neon.md b/gcc/config/arm/neon.md index 843c907..ec35d69 100644 --- a/gcc/config/arm/neon.md +++ b/gcc/config/arm/neon.md @@ -4405,10 +4405,23 @@ "vst1.\t%h1, %A0" [(set_attr "neon_type" "neon_vst1_1_2_regs_vst2_2_regs")]) +(define_expand "neon_vst1_lanedi" + [(match_operand:DI 0 "neon_struct_operand") + (match_operand:DI 1 "s_register_operand") + (match_operand:SI 2 "neon_lane_number")] + "TARGET_NEON" + { + if (INTVAL (operands[2]) == 1) + error ("lane out of range for vst1_lanedi intrinsic"); + emit_move_insn (operands[0], operands[1]); + DONE; + } +) + (define_insn "neon_vst1_lane" [(set (match_operand: 0 "neon_struct_operand" "=Um") (vec_select: - (match_operand:VDX 1 "s_register_operand" "w") + (match_operand:VD 1 "s_register_operand" "w") (parallel [(match_operand:SI 2 "neon_lane_number" "i")])))] "TARGET_NEON" { @@ -4416,15 +4429,10 @@ HOST_WIDE_INT max = GET_MODE_NUNITS (mode); if (lane < 0 || lane >= max) error ("lane out of range"); - if (max == 1) - return "vst1.\t{%P1}, %A0"; - else - return "vst1.\t{%P1[%c2]}, %A0"; + + return "vst1.\t{%P1[%c2]}, %A0"; } - [(set (attr "neon_type") - (if_then_else (eq (const_string "") (const_int 1)) - (const_string "neon_vst1_1_2_regs_vst2_2_regs") - (const_string "neon_vst1_vst2_lane")))]) + [(set_attr "neon_type" "neon_vst1_vst2_lane")]) (define_insn "neon_vst1_lane" [(set (match_operand: 0 "neon_struct_operand" "=Um")