From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 05C493858D32; Thu, 6 Apr 2023 17:32:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 05C493858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1680802343; bh=ps5Gk2ItJbY4FkGfxLUeQE5GmgYBUFHe6X6rd8VgS8A=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xJYMcjQHRKqQsuHsHEbWD5NKYPRrd4C1FRtYeK/AjE5RIIHQDQ6xLeWSrVzgDwb0Q hljwT6bLMmihTguxJFnHLr2wdv6hKxmkUfPalRmusbG8oGh1U28mKNuG5jlysDMbWN rLGhzrRotGKVD5pFc6/gwmAvtUPzepdcQXw663DU= From: "stammark at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/108177] MVE predicated stores to same address get optimized away Date: Thu, 06 Apr 2023 17:32:22 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: stammark at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D108177 --- Comment #5 from Stam Markianos-Wright --- With the fix to MVE auto_inc having gone in as ddc9b5ee13cd686c8674f92d46045563c06a23ea I have found that this fix keeps t= he auto-inc on these predicated stores broken. It seems to fail in auto_inc_dec at this condition: ``` /* Make sure this reg appears only once in this insn. */ if (count_occurrences (PATTERN (mem_insn.insn), mem_insn.reg0, 1) !=3D 1) { if (dump_file) fprintf (dump_file, "mem count failure\n"); return false; } ``` (which makes sense with the pattern now having the MEM appear twice) I guess this is not urgent since this is only a performance impact on one instruction. Also if the change needs to be in the auto-inc pass instead of= the backend, then likely something for GCC14, but I thought this would be a good place to record this ;) Does anyone have any ideas on this? Or I wonder what the AVX case does for = this=