From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id ABF47388B802; Mon, 30 Mar 2020 16:05:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org ABF47388B802 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1585584357; bh=vLZJIA4aaKIuAkgvqWgoXV9Y2S5gMzEsrxUfjZS0ues=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Hyj8DmZkBHCnzj+9dcLYpRsHH1JrfMOMQrIFN/4UPv3gWmwLc29aLbmzl1PDRljI8 7dpGUqcYc4NpDl5ptfIBgZA4/5tKQpAAh+SyMz5raTi71DZe2EvR4i9aieoNzFtFa9 ekd4ToL1QTxb0Tm8T6scOT8GcStnRTRd3zW7btqM= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/94343] [10 Regression] invalid AVX512VL vpternlogd instruction emitted for -march=knl Date: Mon, 30 Mar 2020 16:05:57 +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: 10.0 X-Bugzilla-Keywords: missed-optimization, wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: jakub at gcc dot gnu.org X-Bugzilla-Target-Milestone: 10.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: Mon, 30 Mar 2020 16:05:57 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94343 --- Comment #18 from CVS Commits --- The master branch has been updated by Jakub Jelinek : https://gcc.gnu.org/g:5abbfd3cd36342df530410033844584d8b85e187 commit r10-7460-g5abbfd3cd36342df530410033844584d8b85e187 Author: Jakub Jelinek Date: Mon Mar 30 18:05:01 2020 +0200 i386: Fix up *one_cmplv*2* insn with avx512f [PR94343] This define_insn has two issues. One is that with -mavx512f -mno-avx512vl it can emit an AVX512VL-only i= nsn - 128-bit or 256-bit EVEX encoded vpternlog{d,q}. Another one is that because there is no vpternlog{b,w}, we emit vpternl= ogd instead, but then we shouldn't pretend we support masking of that, beca= use we don't. The first one can be fixed by forcing the use of %zmm* registers instea= d of %xmm* or %ymm* if AVX512F but not AVX512VL, like we do for a couple of other insns (although that is primarily done in order to support %xmm16+ regs= ). But we need to make sure that in that case the input operand isn't memo= ry, because while we can read and store the higher bits of registers, we do= n't want to read from memory more bytes than what we should read. A variant to these two if_then_else set attrs, condition in the output = and larger condition would be 4 different define_insns (one with something = like VI48_AVX512VL iterator, masking, no g modifiers and "vm" input constrai= nt, another one with VI48_AVX iterator, !TARGET_AVX512VL in condition, no masking, g modifiers and "v" input constraint, one with VI12_AVX512VL iterator, no masking, no g modifiers and "vm" input constraint and last= one with VI12_AVX2 iterator, !TARGET_AVX512VL in condition, no masking, g modifi= ers and "v" input constraint, but I think having one pattern is shorter than that. 2020-03-30 Jakub Jelinek PR target/94343 * config/i386/sse.md (one_cmpl2)= : If !TARGET_AVX512VL, use 512-bit vpternlog and make sure the input operand is a register. Don't enable masked variants for V*[QH]Imode. * gcc.target/i386/avx512f-pr94343.c: New test. * gcc.target/i386/avx512vl-pr94343.c: New test.=