From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CC71738A102A; Thu, 6 Jun 2024 06:48:23 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CC71738A102A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1717656503; bh=R82kFJdHEVFWbiRL5Psr+X5nnN6EK43X+GkCNX+P/WU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RWELPi/gzixc+lavE1jQwlKPVSUZtCr0vfPRwUOzn4Zx+cfHKzhb6BP2QAWzMmJkK OG9TPFIOtG0LobfHUWoOTWjKK+N7H1QDLtZDcwc6nKHm5ZB4Y05vyknpbbpVTE5q0t 0p+6HvKA6+e+WMa6blRavDjr8YP/w0fy/shz/FJs= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/115363] Missing loop vectorization due to loop bound load not being pulled out Date: Thu, 06 Jun 2024 06:48: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: 15.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: NEW 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: everconfirmed bug_status cf_reconfirmed_on 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=3D115363 Richard Biener changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2024-06-06 --- Comment #1 from Richard Biener --- Invariant motion doesn't do versioning for aliasing. But in fact once the loop iterates array[k] can no longer alias this->size but this is difficult to exploit (peeling the loop once would help). I'm not sure we should start to version all those loops where the exit condition depends on a not hoistable but invariant expression? But maybe we can diagnose this so people can rewrite their code.=