From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id C6AF93858C55 for ; Thu, 13 Oct 2022 14:43:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C6AF93858C55 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7FFC913D5; Thu, 13 Oct 2022 07:43:07 -0700 (PDT) Received: from [10.1.33.143] (E121495.arm.com [10.1.33.143]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B37403F67D; Thu, 13 Oct 2022 07:43:00 -0700 (PDT) Message-ID: Date: Thu, 13 Oct 2022 15:42:55 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 Subject: Re: ifcvt: Fix bitpos calculation in bitfield lowering [PR107229] Content-Language: en-US To: Richard Biener Cc: Rainer Orth , "Andre Vieira (lists) via Gcc-patches" , Richard Sandiford References: <579078c6-d444-03f2-4db7-1c916b1e88e8@arm.com> From: "Andre Vieira (lists)" In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-14.7 required=5.0 tests=BAYES_00,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 13/10/2022 15:15, Richard Biener wrote: > On Thu, 13 Oct 2022, Andre Vieira (lists) wrote: > >> Hi Rainer, >> >> Thanks for reporting, I was actually expecting these! I thought about >> pre-empting them by using a positive filter on the tests for aarch64 and >> x86_64 as I knew those would pass, but I thought it would be better to let >> other targets report failures since then you get a testsuite that covers more >> targets than just what I'm able to check. >> >> Are there any sparc architectures that would support these or should I just >> xfail sparc*-*-* ? >> >> For instance: I also saw PR107240 for which one of the write tests fails on >> Power 7 BE. I'm suggesting adding an xfail for that one > for the failure below we seem to require vectorizing shifts for which I > think we have a vect_* target to check? 'vect_shift' no sparc on the list of supported targets, so that should do it, I'll add it when I add my fix for powerpc too. > >> Kind regards, >> Andre >> >> On 13/10/2022 12:39, Rainer Orth wrote: >>> Hi Andre, >>> >>>> The bitposition calculation for the bitfield lowering in loop if conversion >>>> was not >>>> taking DECL_FIELD_OFFSET into account, which meant that it would result in >>>> wrong bitpositions for bitfields that did not end up having representations >>>> starting at the beginning of the struct. >>>> >>>> Bootstrappend and regression tested on aarch64-none-linux-gnu and >>>> x86_64-pc-linux-gnu. >>> I tried this patch together with the one for PR tree-optimization/107226 >>> on sparc-sun-solaris2.11 to check if it cures the bootstrap failure >>> reported in PR tree-optimization/107232. While this restores bootstrap, >>> several of the new tests FAIL: >>> >>> +FAIL: gcc.dg/vect/vect-bitfield-read-1.c -flto -ffat-lto-objects >>> scan-tree-dump-times vect "vectorized 1 loops" 1 >>> +FAIL: gcc.dg/vect/vect-bitfield-read-1.c scan-tree-dump-times vect >>> "vectorized 1 loops" 1 >>> +FAIL: gcc.dg/vect/vect-bitfield-read-2.c -flto -ffat-lto-objects >>> scan-tree-dump-times vect "vectorized 1 loops" 1 >>> +FAIL: gcc.dg/vect/vect-bitfield-read-2.c scan-tree-dump-times vect >>> "vectorized 1 loops" 1 >>> +FAIL: gcc.dg/vect/vect-bitfield-read-3.c -flto -ffat-lto-objects >>> scan-tree-dump-times vect "vectorized 2 loops" 1 >>> +FAIL: gcc.dg/vect/vect-bitfield-read-3.c scan-tree-dump-times vect >>> "vectorized 2 loops" 1 >>> +FAIL: gcc.dg/vect/vect-bitfield-read-4.c -flto -ffat-lto-objects >>> scan-tree-dump-times vect "vectorized 1 loops" 1 >>> +FAIL: gcc.dg/vect/vect-bitfield-read-4.c scan-tree-dump-times vect >>> "vectorized 1 loops" 1 >>> +FAIL: gcc.dg/vect/vect-bitfield-read-6.c -flto -ffat-lto-objects >>> scan-tree-dump-times vect "vectorized 1 loops" 1 >>> +FAIL: gcc.dg/vect/vect-bitfield-write-1.c -flto -ffat-lto-objects >>> scan-tree-dump-times vect "vectorized 1 loops" 1 >>> +FAIL: gcc.dg/vect/vect-bitfield-write-1.c scan-tree-dump-times vect >>> "vectorized 1 loops" 1 >>> +FAIL: gcc.dg/vect/vect-bitfield-write-2.c -flto -ffat-lto-objects >>> scan-tree-dump-times vect "vectorized 1 loops" 1 >>> +FAIL: gcc.dg/vect/vect-bitfield-write-2.c scan-tree-dump-times vect >>> "vectorized 1 loops" 1 >>> +FAIL: gcc.dg/vect/vect-bitfield-write-3.c -flto -ffat-lto-objects >>> scan-tree-dump-times vect "vectorized 1 loops" 1 >>> +FAIL: gcc.dg/vect/vect-bitfield-write-3.c scan-tree-dump-times vect >>> "vectorized 1 loops" 1 >>> +FAIL: gcc.dg/vect/vect-bitfield-write-5.c -flto -ffat-lto-objects >>> scan-tree-dump-times vect "vectorized 1 loops" 1 >>> +FAIL: gcc.dg/vect/vect-bitfield-write-5.c scan-tree-dump-times vect >>> "vectorized 1 loops" 1 >>> >>> For vect-bitfield-read-1.c, the dump has >>> >>> gcc.dg/vect/vect-bitfield-read-1.c:25:23: note: ==> examining pattern def >>> statement: patt_31 = patt_30 >> 1; >>> gcc.dg/vect/vect-bitfield-read-1.c:25:23: note: ==> examining statement: >>> patt_31 = patt_30 >> 1; >>> gcc.dg/vect/vect-bitfield-read-1.c:25:23: note: vect_is_simple_use: >>> operand _ifc__27 & 4294967294, type of def: internal >>> gcc.dg/vect/vect-bitfield-read-1.c:25:23: note: vect_is_simple_use: >>> vectype vector(2) unsigned int >>> gcc.dg/vect/vect-bitfield-read-1.c:25:23: note: vect_is_simple_use: >>> operand 1, type of def: constant >>> gcc.dg/vect/vect-bitfield-read-1.c:25:23: missed: op not supported by >>> target. >>> gcc.dg/vect/vect-bitfield-read-1.c:23:1: missed: not vectorized: relevant >>> stmt not supported: patt_31 = patt_30 >> 1; >>> gcc.dg/vect/vect-bitfield-read-1.c:25:23: missed: bad operation or >>> unsupported loop bound. >>> gcc.dg/vect/vect-bitfield-read-1.c:25:23: note: ***** Analysis failed with >>> vector mode V2SI >>> >>> Rainer >>>