From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 43072385DC0F; Mon, 20 Jul 2020 07:55:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 43072385DC0F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1595231725; bh=/M7KSKsMS2hTcbuglKLpjxF9vbWjKxI00nXv/4mPoXw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=xD/SACkpcXqJXY8BGaDJQnb71YlDX9Gwjb50yetNW0LoSHDbnnsqLAy3fsMHWju60 1VIkSVg4rWyu0ocSw+l5QIhjCozwz4aaHnPemo8rlfdzXR1HhiJdI8ZlCtR3BCL8pb akGjn/uEDiraD+XeGTEKrAchXo/W9I4VrHmKQ+Nc= From: "crazylht at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/96246] [AVX512] unefficient code generatation for vpblendm* Date: Mon, 20 Jul 2020 07:55:25 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: crazylht at gmail dot com 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 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: Mon, 20 Jul 2020 07:55:25 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96246 --- Comment #2 from Hongtao.liu --- (In reply to Richard Biener from comment #1) > With -mavx2 it works: >=20 > vpcmpgtd %ymm1, %ymm0, %ymm0 > vpblendvb %ymm0, %ymm2, %ymm3, %ymm0 >=20 > not sure how _load comes into play - we expand from _load_mask have same rtx pattern as _blendm_, t= he only difference is constraint(_load_mask has '0C' for second constrai= nt) --- 1057 (define_insn "_load_mask" 1058 [(set (match_operand:V48_AVX512VL 0 "register_operand" "=3Dv,v") 1059 (vec_merge:V48_AVX512VL 1060 (match_operand:V48_AVX512VL 1 "nonimmediate_operand" "v,m") 1061 (match_operand:V48_AVX512VL 2 "nonimm_or_0_operand" "0C,0C") 1062 (match_operand: 3 "register_operand" "Yk,Yk")))] ... 1159 (define_insn "_blendm" 1160 [(set (match_operand:V48_AVX512VL 0 "register_operand" "=3Dv") 1161 (vec_merge:V48_AVX512VL 1162 (match_operand:V48_AVX512VL 2 "nonimmediate_operand" "vm") 1163 (match_operand:V48_AVX512VL 1 "register_operand" "v") 1164 (match_operand: 3 "register_operand" "Yk")= ))] --- because _load_mask existed early(in line 1057) than _blendm (in line 1159) in md file, after expand, the pattern = is always recognized as _load_mask, and pass_reload will only ma= tch '0' constraint and missed for 'v' constraint. >=20 >=20 > [local count: 1073741824]: > _6 =3D .VCOND (a_2(D), b_3(D), c_4(D), d_5(D), 109); > return _6;=