From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57751 invoked by alias); 6 Oct 2015 01:40:36 -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 57738 invoked by uid 89); 6 Oct 2015 01:40:36 -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-f49.google.com Received: from mail-pa0-f49.google.com (HELO mail-pa0-f49.google.com) (209.85.220.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 06 Oct 2015 01:40:34 +0000 Received: by pacex6 with SMTP id ex6so193304456pac.0 for ; Mon, 05 Oct 2015 18:40:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type; bh=6TqocJcjLNecbPTJ0VLQEubt5NoPzlLDDSPyZg+Ev4I=; b=YRa4HmE3Asr39UKVt2kiH7TehDd1spZOGAatEjzzjZwOS9DLvevS/WRwZrqfby1FpP FjL+f6jU5NtmKAxAs2LwuUCxx5vDs0Jz3wcnFSt89IInU3aiTJhWDqx4jddIyeYH+JJD WZzjwNmObG1TVCSNmQ7TV45XXQxO7cNtlRWxlT5RT3qurb3C2k9Xp0CPk/IAeXX4S9fF 9yhS/Hm9K1jH9XvyvxqjMM9ZVIq6WJyu5ztgSdiUUMYGXK/pWj+bfOHUvay9lrbXCEB8 WTweloWo8SZjE7LhjgTtkpqH9sywkNRQBgVDpQi5AQytVFAdbsT+6DISMsFeEqyZYWd3 M51g== X-Gm-Message-State: ALoCoQk4oFBKiJ/emZ7bQkVDh/9t6z8wdvxKvAb0WmNyH+wm7lTBA75uwSEwy6uPdUbiqJdek2A0 X-Received: by 10.67.5.102 with SMTP id cl6mr44162675pad.4.1444095632605; Mon, 05 Oct 2015 18:40:32 -0700 (PDT) Received: from [10.1.1.2] (58-6-183-210.dyn.iinet.net.au. [58.6.183.210]) by smtp.googlemail.com with ESMTPSA id sn9sm12751481pac.16.2015.10.05.18.40.28 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Oct 2015 18:40:31 -0700 (PDT) Subject: Re: [AARCH64] Add missing entries in iterator vwcore To: James Greenhalgh References: <560D9A70.60404@linaro.org> <20151005103322.GA17689@arm.com> Cc: "gcc-patches@gcc.gnu.org" , Marcus Shawcroft From: Kugan Message-ID: <5613268A.6010201@linaro.org> Date: Tue, 06 Oct 2015 01:40:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151005103322.GA17689@arm.com> Content-Type: multipart/mixed; boundary="------------040301010906010004000305" X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00490.txt.bz2 This is a multi-part message in MIME format. --------------040301010906010004000305 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Content-length: 3835 On 05/10/15 21:33, James Greenhalgh wrote: > On Thu, Oct 01, 2015 at 09:41:20PM +0100, Kugan wrote: >> 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? >> >> 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. >> > > "foo.c" is not OK, please give this testcase a meaningful name. > >> 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")]) > > I don't understand the reasoning here, Surely we want "w" for SI,HI,QI > modes? Though are you sure we need them to fix your bug? I'd have expected > the hunk for V4HF and V8HF to be enough. Yes, the hunk for V4HF and V8HF is enough and that is what I started with. Then I was thinking maybe we should cover all the modes in VEL. Please find the attached that has just V4HF and V8HF. > >> >> ;; 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 > > Again, please give this test a meaningful name. Renamed the test case. Is this OK now? Thanks, Kugan gcc/ChangeLog: 2015-10-06 Kugan Vivekanandarajah * config/aarch64/iterators.md: Add missing core element mode for mode. gcc/testsuite/ChangeLog: 2015-10-06 Kugan Vivekanandarajah * gcc.target/aarch64/vcore_ice_test.c: New test. > > Thanks, > James > >> @@ -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(); >> +} > --------------040301010906010004000305 Content-Type: text/plain; charset=UTF-8; name="p.txt" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="p.txt" Content-length: 1207 diff --git a/gcc/config/aarch64/iterators.md b/gcc/config/aarch64/iterators.md index 38c5a24..90e8533 100644 --- a/gcc/config/aarch64/iterators.md +++ b/gcc/config/aarch64/iterators.md @@ -537,6 +537,7 @@ (V4HI "w") (V8HI "w") (V2SI "w") (V4SI "w") (DI "x") (V2DI "x") + (V4HF "w") (V8HF "w") (V2SF "w") (V4SF "w") (V2DF "x")]) diff --git a/gcc/testsuite/gcc.target/aarch64/vcore_ice_test.c b/gcc/testsuite/gcc.target/aarch64/vcore_ice_test.c index e69de29..77f161e 100644 --- a/gcc/testsuite/gcc.target/aarch64/vcore_ice_test.c +++ b/gcc/testsuite/gcc.target/aarch64/vcore_ice_test.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(); +} --------------040301010906010004000305--