public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Christophe Lyon <christophe.lyon@arm.com>,
	gcc-patches@gcc.gnu.org, richard.sandiford@arm.com
Subject: Re: [PATCH v3 2/2] aarch64: Fix bit-field alignment in param passing [PR105549]
Date: Fri, 13 Jan 2023 20:25:01 +0100	[thread overview]
Message-ID: <Y8GwDbPEUDHI2IUw@tucnak> (raw)
In-Reply-To: <Y8F62Kr7TO1XgP9U@tucnak>

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=<function_decl 0x7fffe985b900 sel2_pst_uniform4>, do_parms=true) at ../../gcc/gimplify.cc:17619
#5  0x0000000001156ca0 in gimplify_function_tree (fndecl=<function_decl 0x7fffe985b900 sel2_pst_uniform4>) at ../../gcc/gimplify.cc:17822
#6  0x0000000000ea2402 in cgraph_node::analyze (this=<cgraph_node * const 0x7fffe985f220 "sel2_pst_uniform4"/39>) 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


  reply	other threads:[~2023-01-13 19:25 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11 14:18 [PATCH v3 1/2] aarch64: fix warning emission for ABI break since GCC 9.1 Christophe Lyon
2023-01-11 14:18 ` [PATCH v3 2/2] aarch64: Fix bit-field alignment in param passing [PR105549] Christophe Lyon
2023-01-12 13:19   ` Richard Sandiford
2023-01-12 13:38     ` Christophe Lyon
2023-01-13 15:38   ` Jakub Jelinek
2023-01-13 19:25     ` Jakub Jelinek [this message]
2023-01-13 19:50       ` Jakub Jelinek
2023-01-15 16:54     ` Christophe Lyon
2023-01-17 12:43       ` Christophe Lyon
2023-01-17 12:48         ` Jakub Jelinek
2023-01-17 12:50           ` Christophe Lyon
2023-01-12 13:03 ` [PATCH v3 1/2] aarch64: fix warning emission for ABI break since GCC 9.1 Richard Sandiford
2023-01-12 13:39   ` Christophe Lyon
2023-01-25 14:30   ` Christophe Lyon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y8GwDbPEUDHI2IUw@tucnak \
    --to=jakub@redhat.com \
    --cc=christophe.lyon@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.sandiford@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).