From patchwork Mon Aug 12 12:51:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Georg-Johann Lay X-Patchwork-Id: 1971570 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gjlay.de header.i=@gjlay.de header.a=rsa-sha256 header.s=strato-dkim-0002 header.b=KUg4neMQ; dkim=pass header.d=gjlay.de header.i=@gjlay.de header.a=ed25519-sha256 header.s=strato-dkim-0003 header.b=rqbbnI7T; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WjDt00dmBz1yYC for ; Mon, 12 Aug 2024 22:51:33 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 91D5A3858C60 for ; Mon, 12 Aug 2024 12:51:30 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mo4-p00-ob.smtp.rzone.de (mo4-p00-ob.smtp.rzone.de [85.215.255.21]) by sourceware.org (Postfix) with ESMTPS id 2368E3858D20 for ; Mon, 12 Aug 2024 12:51:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2368E3858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=gjlay.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=gjlay.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 2368E3858D20 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=85.215.255.21 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1723467075; cv=pass; b=pboDzCJinwjLOHPCK0LOiYXWwkepmLeiQB1Z5KuRr51A+shxWlkpl+M5aYAYwaePbsnPcwtaHMB2tmHsLo0Noe5mGExpfQWC4DTKvGDvPJXM8koGzF//cnyNn1Er/zOF3RnRzwQHNcKV33SqiMheNpzLt4HduYkiW1gWA6i0W/k= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1723467075; c=relaxed/simple; bh=kFZUc/At6TaC/ihaaUxLCIkDqwwDLlu37+gOjGzdB/A=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:MIME-Version:From: To:Subject; b=M4vMP9fkLzZb3I0erqaMgzzabDhRv9ijzx2i/s9Di4lHGYQ29Y84aRb+Pl+Xn11iz0dbxSwbnDn+FV/MzUp5F8J5hfBKqXt9SWGUjVAMnOdmtDCzdFo4499cJqQCIt8AhGLUjvgstJk1i+tfG/rcwyAUN3gasqr/bMgr/zQFeh8= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; t=1723467071; cv=none; d=strato.com; s=strato-dkim-0002; b=RiGmBotZpDuJOsxsf+ZOcIOqHKae3gM7wE+NU8bsi0JzAOvt4i3/0TFaIGWtdR8igW pe+i/tU7tAj3zTYmi3737UWCDj1mbliRvfvtza0ahF1wLWVpvgnKMGctqDTITWSmFHLp 5F5de4wXMh4CXftiK7V9fSMtROix2RDavezBEkp4H3Slc5IDeGj2TkGDCfE3v0RBlHDM qq33fEjWIBwYPR2aAtU9rjj8mVNWJKRjEwpIKRGDUpPdV+gN1kIjNf5pTGv8X3110EDm rHNoxC/MHmmi9IGWa7cnqA8x5gmNE6FKtoycBcei/W8SDwW7J7dXJrQYOfsJ3iTvYuvM t5uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1723467071; s=strato-dkim-0002; d=strato.com; h=Subject:To:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=Enunres7+rJ7rhFx4VagBIyTbM4qFfZQ0kkx/T+IZQE=; b=BMUXf7bAbAKi1Blda65X1UzEHPjpgDQE/ue/3VHFE02PppIizHq80srLKO6DNx15pV vdmJdWtPFAgZdoeFyD07qLzLKAGRwT//JEDcfBJz9SuBwz0BigijzQlS02y3PHswntHM x7o/hpSbUQFlUEeBuqvr6U0UCQfDt2r/idlsIviQj7kjNIeAlzGBq7xxxZbwlnlTZ4d8 4Jcu7UAdnJPXUABvUwVoVayFCdMOQJAFPr+yqeaz4EoUUCjAZpSt0ONys6hCqyCLJta6 bu94IQMnZhBCzXn3SH40zBXw4YNvjgRj/NHdtHUyF9kribNomht+GEERb75LLmbSjV29 nWbA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1723467071; s=strato-dkim-0002; d=gjlay.de; h=Subject:To:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=Enunres7+rJ7rhFx4VagBIyTbM4qFfZQ0kkx/T+IZQE=; b=KUg4neMQ34cSFEhViBpg5M/j6CmYs7g7rvYUUp4L27ZQwuQ8WmZOAxCbU7Dh1zNXvA x7CC5KheCmTWd2EOxIg4ddY7CYj+MJCVSJL5yIEueGtmMqXRhR1UITo0NYOoRLjhb4Fw vlHjh5jHvxfGS+ySX796YQpmA5C557AampU4V/UHgEJA5lNk4+o395yQ0ibUHVW/SMGX luCuGrNDe07lxDj0hNjBFfxL2KnTddwMkMQ/jMKEjzzTqC+IsGjLut/LPPi4hnHQLMnj 8OiXrWIcshT6yHLnK8rLEub4wlmvk/0oS5eulECt/d0TurJc7jMEml05g0yUbeSbGvTY 4Ylg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1723467071; s=strato-dkim-0003; d=gjlay.de; h=Subject:To:From:Date:Message-ID:Cc:Date:From:Subject:Sender; bh=Enunres7+rJ7rhFx4VagBIyTbM4qFfZQ0kkx/T+IZQE=; b=rqbbnI7TJHa22AFeaUAnrDoBgbP/i3yxPRWHBR8g4yohOlmFaT3CVypqVk+DdboGHG MC3E7ixTLPSe6kKVvfBw== X-RZG-AUTH: ":LXoWVUeid/7A29J/hMvvT3koxZnKXKoq0dKoR0vetzhr/2IDlGFRklUq" Received: from [192.168.2.102] by smtp.strato.de (RZmta 51.1.0 DYNA|AUTH) with ESMTPSA id xa21ea07CCpB34W (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate) for ; Mon, 12 Aug 2024 14:51:11 +0200 (CEST) Message-ID: <44140111-e81b-407b-9215-78ad85aab1e1@gjlay.de> Date: Mon, 12 Aug 2024 14:51:10 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Georg-Johann Lay Content-Language: en-US To: "gcc-patches@gcc.gnu.org" Subject: [patch,avr,applied] Fix PR85624 X-Spam-Status: No, score=-10.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org This fixes an unrecognizable insn ICE when alignments >= 128 were passed from setmemhi to clrmemqi*. Alignment is unused, hence set it to 0 so that the patterns match for big alignments. Johann --- AVR: target/85624 - Fix non-matching alignment in clrmem* insns. The clrmem* patterns don't use the provided alignment information, hence the setmemhi expander can just pass down 0 as alignment to the clrmem* insns. PR target/85624 gcc/ * config/avr/avr.md (setmemhi): Set alignment to 0. gcc/testsuite/ * gcc.target/avr/torture/pr85624.c: New test. diff --git a/gcc/config/avr/avr.md b/gcc/config/avr/avr.md index 84dfe4c40ec..359343e563d 100644 --- a/gcc/config/avr/avr.md +++ b/gcc/config/avr/avr.md @@ -1355,6 +1355,8 @@ (define_expand "setmemhi" gen_int_mode (INTVAL (operands[1]), mode)); rtx addr0 = copy_to_mode_reg (Pmode, XEXP (operands[0], 0)); operands[0] = gen_rtx_MEM (BLKmode, addr0); + // Alignment is unused; just set it to 0. + operands[3] = const0_rtx; }) diff --git a/gcc/testsuite/gcc.target/avr/torture/pr85624.c b/gcc/testsuite/gcc.target/avr/torture/pr85624.c new file mode 100644 index 00000000000..b183d4558df --- /dev/null +++ b/gcc/testsuite/gcc.target/avr/torture/pr85624.c @@ -0,0 +1,7 @@ +/* { dg-do compile } */ + +int foo (void) +{ + volatile int arr[3] __attribute__((aligned(128))) = { 0 }; + return arr[2]; +}