From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 6EEE93858C55 for ; Thu, 13 Oct 2022 14:15:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6EEE93858C55 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 2E2A61F86A; Thu, 13 Oct 2022 14:15:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1665670533; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Zs0/yJfQvNFqBIe+5vOXRMHgSwyATjcLcAnqPQnoQ0c=; b=rHrlKau513F4tJ7ovMOuo0GdptNac8oXalAEjqhjRNxs1NpuPpVeZ/siUEeoUOvkXysQuy XMSzyX8SLwjlG2cdBuWV4JBUC81mgBf3B+jQhUU8yyVGwcJo7BdCuuXYUZQON/gABsErBS oe702iWPWoCVUWzaspmZTxMKhowqiCE= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1665670533; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Zs0/yJfQvNFqBIe+5vOXRMHgSwyATjcLcAnqPQnoQ0c=; b=6Az3g5+AKuelO/IShjE9LAh5P3cZbpZd5YZ/1BLy0Zj1zTya7MR9BJ5GUjUO3FWJF+Tc4n eBqMp0VIk6atfhBg== Received: from wotan.suse.de (wotan.suse.de [10.160.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 037C22C142; Thu, 13 Oct 2022 14:15:32 +0000 (UTC) Date: Thu, 13 Oct 2022 14:15:32 +0000 (UTC) From: Richard Biener To: "Andre Vieira (lists)" cc: Rainer Orth , "Andre Vieira (lists) via Gcc-patches" , Richard Sandiford Subject: Re: ifcvt: Fix bitpos calculation in bitfield lowering [PR107229] In-Reply-To: <579078c6-d444-03f2-4db7-1c916b1e88e8@arm.com> Message-ID: References: <579078c6-d444-03f2-4db7-1c916b1e88e8@arm.com> User-Agent: Alpine 2.22 (LSU 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,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 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? > 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 > > > -- Richard Biener SUSE Software Solutions Germany GmbH, Frankenstrasse 146, 90461 Nuernberg, Germany; GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman; HRB 36809 (AG Nuernberg)