From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2C3B138381E4; Fri, 25 Nov 2022 21:27:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2C3B138381E4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669411629; bh=HYVe+CB9YjZxJDy2EQHTegwTbAv74Lbf9uxC3NSf1Es=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wCYZaWksAJSDS/yHnLHLgFxy+IaM5G85X7hxZv7sN0JXSpY5FyzR7EmrO9PQuH4/D OYzYsTLo9DvdRcNbqyFdV/7LXyFrWgFqBwF3oXd+2VvjhPnsTkTSgYlo5Ai9yeoPPU R+dR+Aa+fb7GJytIK6YgLb1uuPbunmNlo3TZf2/Q= From: "amonakov at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/97832] AoSoA complex caxpy-like loops: AVX2+FMA -Ofast 7 times slower than -O3 Date: Fri, 25 Nov 2022 21:27:08 +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: 10.2.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: amonakov at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 12.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc 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=3D97832 Alexander Monakov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |amonakov at gcc dot gnu.org --- Comment #18 from Alexander Monakov --- The apparent 'bias' is introduced by instruction scheduling: haifa-sched li= fts a +64 increment over memory accesses, transforming +0 and +32 displacements= to -64 and -32. Sometimes this helps a little bit even on modern x86 CPUs. Also note that 'vfnmadd231pd 32(%rdx,%rax), %ymm3, %ymm0' would be 'unlaminated' (turned to 2 uops before renaming), so selecting independent = IVs for the two arrays actually helps on this testcase.=