From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 876B63858402; Tue, 21 Sep 2021 10:39:58 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 876B63858402 From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/102408] [OpenACC] omp-oacc-neuter-broadcast.cc: random() not available on all platforms Date: Tue, 21 Sep 2021 10:39:58 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: openacc X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: tschwinge 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: Tue, 21 Sep 2021 10:39:58 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102408 --- Comment #2 from CVS Commits --- The master branch has been updated by Thomas Schwinge : https://gcc.gnu.org/g:e87789f197e47259c94349821d3446f7d959e08f commit r12-3726-ge87789f197e47259c94349821d3446f7d959e08f Author: Thomas Schwinge Date: Tue Sep 21 08:54:49 2021 +0200 Evaluate 'random ()' to '0' in 'pass_omp_oacc_neuter_broadcast' Julian Brown, : | [...] the randomness shouldn't be necessary for the | correctness of the patch (i.e. it could just be "base =3D bounds_lo",= or | indeed folded into the line after). | | The "ar.invalid ()" case happens when we fail to allocate a block of | memory in LDS space for broadcasting a particular set of variables, | and trigger a fall-back path in the broadcasting code that adds extra | barriers around the broadcast in question. I imagine I was thinking | that adding randomness could mean we can "get lucky" sometimes and | avoid needing those barriers in some cases, but in fact I don't think | that was implemented, so the randomness is useless. (Or it could just | have been leftover debug code... oops). gcc/ PR other/102408 * omp-oacc-neuter-broadcast.cc (oacc_do_neutering): Evaluate 'random ()' to '0'.=