From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E40163858D32; Wed, 28 Jun 2023 05:07:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E40163858D32 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1687928850; bh=yf2PY0QKink3zgtZzBVRIEXimrVYmxOnGBPX5FdT6ZQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=CMr2P9ZqYhee6f3ShML0fV/QbXwPSNVV5F5PE9ynL+Uah9dvC34b6LhpkDGoFyv6K Prmry2wLmHlY8C1p1FRgDJk17R7qTkbz7HFZZc0O4Ri8eCXEaoSIhXRBC3SDzSR0nC q9+V8u4MnOcax4OzaWLJ1jhcYtXMfjfg66MCwrPg= From: "amonakov at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/110202] _mm512_ternarylogic_epi64 generates unnecessary operations Date: Wed, 28 Jun 2023 05:07:29 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: missed-optimization X-Bugzilla-Severity: enhancement X-Bugzilla-Who: amonakov 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=3D110202 --- Comment #9 from Alexander Monakov --- (In reply to Hongtao.liu from comment #8) >=20 > For this one, we can load *a into %zmm0 to avoid false_dependence. >=20 > vmovdqau ZMMWORD PTR [rdi], zmm0 > vpternlogq zmm0, zmm0, zmm0, 85 Yes, since ternlog with memory operand needs two fused-domain uops on Intel CPUs, breaking out the load would be more efficient for both negate1 and negate2.=