From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id F0F663858C39 for ; Fri, 13 Jan 2023 19:25:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F0F663858C39 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1673637907; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=eixCmyP/HdC2F5zWLcQoQbAxsPpH8Mv1ds45MEjyW7s=; b=aQa0dxxnWfqTKT4ajBU79eP1L5aP95hsaf+UZi8L73lDlc+L+dAxKqsZfMGPBO6e3z5Jdv CPZyQpA4rgo5JW84noKC9rzShh7YraptyxWaC5thUjCdC6nu/Zskq+S/yh/HnWLGN+2mJS W/XVXji5jIog4mFGAp6+67Xn0I2cRHk= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-215-NtWfqZBtMdKNVfH6Qfsfyg-1; Fri, 13 Jan 2023 14:25:06 -0500 X-MC-Unique: NtWfqZBtMdKNVfH6Qfsfyg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A21333811F46; Fri, 13 Jan 2023 19:25:05 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.223]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5E94353A0; Fri, 13 Jan 2023 19:25:05 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 30DJP2HW1368071 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 13 Jan 2023 20:25:03 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 30DJP1iC1368070; Fri, 13 Jan 2023 20:25:01 +0100 Date: Fri, 13 Jan 2023 20:25:01 +0100 From: Jakub Jelinek To: Christophe Lyon , gcc-patches@gcc.gnu.org, richard.sandiford@arm.com Subject: Re: [PATCH v3 2/2] aarch64: Fix bit-field alignment in param passing [PR105549] Message-ID: Reply-To: Jakub Jelinek References: <20230111141806.258233-1-christophe.lyon@arm.com> <20230111141806.258233-2-christophe.lyon@arm.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_SHORT,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TXREP,WEIRD_PORT 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 Fri, Jan 13, 2023 at 04:38:00PM +0100, Jakub Jelinek via Gcc-patches wrote: > I'm seeing > +FAIL: g++.target/aarch64/bitfield-abi-warning-align16-O2.C scan-assembler-times and\\tw0, w1, 1 10 > +FAIL: g++.target/aarch64/bitfield-abi-warning-align32-O2.C scan-assembler-times and\\tw0, w1, 1 10 > +FAIL: g++.target/aarch64/bitfield-abi-warning-align8-O2.C scan-assembler-times and\\tw0, w0, 1 11 > +FAIL: g++.target/aarch64/bitfield-abi-warning-align8-O2.C scan-assembler-times and\\tw0, w1, 1 18 The above seems only because I'm testing with > +FAIL: gcc.target/aarch64/sve/pcs/struct_3_128.c -march=armv8.2-a+sve (internal compiler error: in aarch64_layout_arg, at config/aarch64/aarch64.cc:7696) > +FAIL: gcc.target/aarch64/sve/pcs/struct_3_128.c -march=armv8.2-a+sve (test for excess errors) > +FAIL: gcc.target/aarch64/sve/pcs/struct_3_256.c -march=armv8.2-a+sve (internal compiler error: in aarch64_layout_arg, at config/aarch64/aarch64.cc:7696) > +FAIL: gcc.target/aarch64/sve/pcs/struct_3_256.c -march=armv8.2-a+sve (test for excess errors) > +FAIL: gcc.target/aarch64/sve/pcs/struct_3_512.c -march=armv8.2-a+sve (internal compiler error: in aarch64_layout_arg, at config/aarch64/aarch64.cc:7696) > +FAIL: gcc.target/aarch64/sve/pcs/struct_3_512.c -march=armv8.2-a+sve (test for excess errors) > regressions with this change. But these I can reproduce using a cross compiler on current trunk: #0 fancy_abort (file=0x2da73c0 "../../gcc/config/aarch64/aarch64.cc", line=7710, function=0x2da8917 "aarch64_layout_arg") at ../../gcc/diagnostic.cc:2219 #1 0x0000000001a8756b in aarch64_layout_arg (pcum_v=..., arg=...) at ../../gcc/config/aarch64/aarch64.cc:7710 #2 0x0000000001a88477 in aarch64_function_arg_advance (pcum_v=..., arg=...) at ../../gcc/config/aarch64/aarch64.cc:8023 #3 0x000000000107cb17 in gimplify_parameters (cleanup=0x7fffffffd8c0) at ../../gcc/function.cc:3929 #4 0x0000000001156366 in gimplify_body (fndecl=, do_parms=true) at ../../gcc/gimplify.cc:17619 #5 0x0000000001156ca0 in gimplify_function_tree (fndecl=) at ../../gcc/gimplify.cc:17822 #6 0x0000000000ea2402 in cgraph_node::analyze (this=) at ../../gcc/cgraphunit.cc:676 #7 0x0000000000ea4489 in analyze_functions (first_time=true) at ../../gcc/cgraphunit.cc:1240 #8 0x0000000000ea7a06 in symbol_table::finalize_compilation_unit (this=0x7fffea38b000) at ../../gcc/cgraphunit.cc:2547 #9 0x0000000001572df1 in compile_file () at ../../gcc/toplev.cc:471 #10 0x0000000001575caf in do_compile (no_backend=false) at ../../gcc/toplev.cc:2125 #11 0x0000000001576078 in toplev::main (this=0x7fffffffdc6a, argc=14, argv=0x7fffffffdd98) at ../../gcc/toplev.cc:2277 #12 0x0000000002a81c6a in main (argc=14, argv=0x7fffffffdd98) at ../../gcc/main.cc:39 alignment is 256, which is not <= 16 * BITS_PER_UNIT. type is pst_uniform4 with user alignment of 32 bytes: struct pst_uniform4 { fixed_int32_t a __attribute__((aligned(SVE_BYTES * 2))); fixed_int32_t b[3] __attribute__((aligned(SVE_BYTES * 2))); fixed_int32_t c __attribute__((aligned(SVE_BYTES * 2))); }; and with -march=armv8.2-a+sve -msve-vector-bits=128 __ARM_FEATURE_SVE_BITS and therefore SVE_BYTES is 128 and so the alignment seems requested. Jakub