From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id CA21A3851425; Fri, 26 Aug 2022 16:35:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CA21A3851425 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661531709; bh=UT90l+56nK/UKE8zttTj8SrswV6QaPxM9MN4G3M3YIQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=NzEIlIXRI1NlXT9oHCuBVRh9GWlW2kA5MQAbujThkdWzvvpfvcSN0CqcvtWV/cZVa k2w+k9d2DvSzYJfDD3EfBA9Q+nuTa4QMp8y7oTbudFguAkt8HxfNBg2GKL5OwA6TJq iPuSYN3PxsAibYSOo8qjdNBQ+mddb9Xf7fJn+Xg0= From: "bergner at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/106755] Incorrect code gen for altivec intrinsics with constant inputs Date: Fri, 26 Aug 2022 16:35:09 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 12.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: blocker X-Bugzilla-Who: bergner 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: 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=3D106755 --- Comment #2 from Peter Bergner --- So the tests (I've removed all static inline usage and always use -fno-inli= ne) pass with -O1 and fail with -O2 and -O3. Looking at all of the optimizatio= ns enabled by -O2 that are not in -O1 and using -fno-* for them, the only opti= on that allows the tests to pass with -O2 is -fno-strict-aliasing. That said, -Wall and -Wstrict-aliasing do not flag any warnings with the code. I supp= ose they could miss some issues in the test case code??? In addition, if I move the vec_muludq() function to its own source file, th= en the tests pass with -O2 and -O3.=