From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B85403858415; Wed, 6 Oct 2021 08:45:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B85403858415 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/102571] FAIL: libgomp.c/../libgomp.c-c++-common/atomic-21.c execution test Date: Wed, 06 Oct 2021 08:45:23 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Oct 2021 08:45:23 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102571 --- Comment #3 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:ba837323dbda2bca5a1c8a4c78092a88241dcfa3 commit r12-4207-gba837323dbda2bca5a1c8a4c78092a88241dcfa3 Author: Jakub Jelinek Date: Wed Oct 6 10:40:12 2021 +0200 openmp: Optimize for OpenMP atomics 2x__builtin_clear_padding+__builtin_memcmp if possible For the few long double types that do have padding bits, e.g. on x86 the clear_type_padding_in_mask computed mask is ff ff ff ff ff ff ff ff ff ff 00 00 for 32-bit and ff ff ff ff ff ff ff ff ff ff 00 00 00 00 00 00 for 64-bit. Instead of doing __builtin_clear_padding on both operands that will cle= ar the last 2 or 6 bytes and then memcmp on the whole 12/16 bytes, we can just memcmp 10 bytes. The code also handles if the padding would be at the start or both at the start and end, but everything on byte boundaries only and non-padding bits being contiguous. This works around a tree-ssa-dse.c bug (but we need to fix it anyway, as libstdc++ won't do this and as it can deal with arbitrary types, it = even can't do that generally). 2021-10-06 Jakub Jelinek PR tree-optimization/102571 * c-omp.c (c_finish_omp_atomic): Optimize the case where type h= as padding, but the non-padding bits are contiguous set of bytes by adjusting the memcmp call arguments instead of emitting __builtin_clear_padding and then comparing all the type's bytes= .=