From patchwork Thu Oct 1 20:41:20 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kugan Vivekanandarajah X-Patchwork-Id: 525298 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B57FB140157 for ; Fri, 2 Oct 2015 06:41:55 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=jIcc9y1R; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:cc:message-id:date:mime-version:content-type; q= dns; s=default; b=QfucSb5LDjH/xMe2vg8IMMA0sxc2UfRSaSxJCQ1gXbY+fY UZ5tT3oEV6IBqXV50ncer4bwWxjsscl/KxKT4sURsE93v/aaKCONYtlmbL9xbMic /zI5+EOzr3eEWmBfF1kRTRf/ufKjfg2n5a1xA5CwDRJiKi5AEfBAD4H6NUZYI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:to :from:subject:cc:message-id:date:mime-version:content-type; s= default; bh=KtrN/oMAIuipIMMSyYGsjcJlJP8=; b=jIcc9y1RpnKN8t34aLRM o5/YkgruNrpsupR3rv0YmkPo/ngoxXMxHWtu/I6L4QGnG5g9mEMbpFiOp6dkqCs1 nPGzjuWwJC+i/W5QKsb0XLDaUQjO/xRFt/b4j5f90Mp1uXCSBG1W5KwX9NT13Wio nPh27V2GsyRogomzlbNAIXU= Received: (qmail 78396 invoked by alias); 1 Oct 2015 20:41:39 -0000 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 Received: (qmail 78324 invoked by uid 89); 1 Oct 2015 20:41:38 -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, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f52.google.com Received: from mail-pa0-f52.google.com (HELO mail-pa0-f52.google.com) (209.85.220.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 01 Oct 2015 20:41:28 +0000 Received: by pacfv12 with SMTP id fv12so86347043pac.2 for ; Thu, 01 Oct 2015 13:41:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:to:from:subject:cc:message-id:date:user-agent :mime-version:content-type; bh=BPtd7/Mep1PDbYvS0iOL4Z656wnlF/0hoIXxw7RUkn4=; b=mGm96F7aZ9fMSUX5Z+AnOqovtRnrwRm1aq5dxChKKqg+x1bnK1DfkCwGZDlzv2tm/z jzudsNZKy2Gq962vBRBYSXzNluB7LpRZ3SzW3EkkuOvF5zLhhNh6BVazpjgraa7NFEF1 7t9sARL1/zrMydellENAQF+mRrTq4/axRDRpyXM7Vv11pjQj095qq2yk/UIyGU2pMAJT uNj2x55/BDdjECaPQ76Ue1SSFytyRA44sqGcL+XENM9Q4oWjyyok26vYsO4Z6+Qb2aZo ZwaJwzW8GlRJE81ZFbGnsJcQL2WpSQH2ZKkVVKuMTzCwslA4m0nphgJmutlPHPOefy2n GKAA== X-Gm-Message-State: ALoCoQm/Xx6wyQIV0fBgmHgNSdU0O7cpQVzJ67GzdBFFNy45eQDbteyrhw9vsnILqjjqTMqD6xfh X-Received: by 10.66.252.35 with SMTP id zp3mr14590311pac.43.1443732086189; Thu, 01 Oct 2015 13:41:26 -0700 (PDT) Received: from [10.1.1.6] (58-6-183-210.dyn.iinet.net.au. [58.6.183.210]) by smtp.googlemail.com with ESMTPSA id z13sm8414984pas.34.2015.10.01.13.41.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Oct 2015 13:41:25 -0700 (PDT) To: "gcc-patches@gcc.gnu.org" From: Kugan Subject: [AARCH64] Add missing entries in iterator vwcore Cc: James Greenhalgh , Marcus Shawcroft Message-ID: <560D9A70.60404@linaro.org> Date: Fri, 2 Oct 2015 06:41:20 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 X-IsSubscribed: yes Hi, In "aarch64_get_lane" operand 0 is VEL, so for %0, iterator vwcore should (?) support all the modes in VEL. Ran into following error with a local patch for an existing test case. However it can also be reproduced with the attached test case. fnction ‘fn1’: t.c:25:1: internal compiler error: output_operand: invalid %-code } ^ 0x8198fb output_operand_lossage(char const*, ...) ../../base/gcc/final.c:3417 0x81a45b output_asm_insn(char const*, rtx_def**) ../../base/gcc/final.c:3782 0x81b9d3 output_asm_insn(char const*, rtx_def**) ../../base/gcc/final.c:2364 0x81b9d3 final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*) ../../base/gcc/final.c:3029 0x81be2b final(rtx_insn*, _IO_FILE*, int) ../../base/gcc/final.c:2058 0x81c6e7 rest_of_handle_final ../../base/gcc/final.c:4449 0x81c6e7 execute ../../base/gcc/final.c:4524 Attached patch fixes this. Bootstrapped and regression tested for aarch64-none-linux-gnu with no new regression. Is this OK for trunk? Thanks, Kugan gcc/ChangeLog: 2015-10-02 Kugan Vivekanandarajah * config/aarch64/iterators.md: Add missing core element mode for mode. gcc/testsuite/ChangeLog: 2015-10-02 Kugan Vivekanandarajah * gcc.target/aarch64/foo.c: New test. diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md index 38c5a24..e49abd5 100644 --- a/gcc/config/aarch64/iterators.md +++ b/gcc/config/aarch64/iterators.md @@ -537,8 +537,11 @@ (V4HI "w") (V8HI "w") (V2SI "w") (V4SI "w") (DI "x") (V2DI "x") + (V4HF "w") (V8HF "w") (V2SF "w") (V4SF "w") - (V2DF "x")]) + (V2DF "x") (SI "x") + (HI "x") (QI "x")]) + ;; Double vector types for ALLX. (define_mode_attr Vallxd [(QI "8b") (HI "4h") (SI "2s")]) diff --git a/gcc/testsuite/gcc.target/aarch64/foo.c b/gcc/testsuite/gcc.target/aarch64/foo.c index e69de29..77f161e 100644 --- a/gcc/testsuite/gcc.target/aarch64/foo.c +++ b/gcc/testsuite/gcc.target/aarch64/foo.c @@ -0,0 +1,25 @@ + +/* { dg-do compile } */ +/* { dg-options "-O3" } */ + +void fn2 (); + +typedef __Float16x4_t float16x4_t; +__fp16 result_float16x4[1]; +float16x4_t exec_vst1_lane_vector_float16x4, exec_vst1_lane___trans_tmp_1; + +void fn1 () +{ + exec_vst1_lane_vector_float16x4 = exec_vst1_lane___trans_tmp_1; + __fp16 *__a = result_float16x4; + float16x4_t __b = exec_vst1_lane___trans_tmp_1; + int __lane = 0; + *__a = ({ __b[__lane]; }); + union { + short i; + __fp16 f; + } tmp_res; + tmp_res.f = result_float16x4[0]; + if (tmp_res.i) + fn2(); +}