From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B3CE4386F46E; Thu, 4 Mar 2021 18:12:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B3CE4386F46E From: "ubizjak at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/98856] [11 Regression] botan AES-128/XTS is slower by ~17% since r11-6649-g285fa338b06b804e72997c4d876ecf08a9c083af Date: Thu, 04 Mar 2021 18:12:09 +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: 11.0 X-Bugzilla-Keywords: missed-optimization, ra X-Bugzilla-Severity: normal X-Bugzilla-Who: ubizjak at gmail dot com X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 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: Thu, 04 Mar 2021 18:12:09 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D98856 --- Comment #21 from Uro=C5=A1 Bizjak --- (In reply to Uro=C5=A1 Bizjak from comment #20) > (In reply to Richard Biener from comment #18) > > Even on Skylake it's 2 (movq) + 3 (vpinsr), so there it's 6 vs. 3. Not > > sure if we should somehow do this late somehow (peephole or splitter) s= ince > > it requires one more %xmm register. > What happens if you disparage [v]pinsrd alternatives in vec_concatv2di? Please try this: diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index db5be59f5b7..edf7b1a3074 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -16043,7 +16043,12 @@ (const_string "maybe_evex") ] (const_string "orig"))) - (set_attr "mode" "TI,TI,TI,TI,TI,TI,V4SF,V2SF,V2SF")]) + (set_attr "mode" "TI,TI,TI,TI,TI,TI,V4SF,V2SF,V2SF") + (set (attr "preferred_for_speed") + (cond [(eq_attr "alternative" "0,1,2,3") + (symbol_ref "false") + ] + (symbol_ref "true")))]) (define_insn "*vec_concatv2di_0"=