From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 528C2385E01C; Thu, 26 Mar 2020 16:41:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 528C2385E01C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1585240871; bh=aVic6sop6AYXNmMmkXflUwh11D1yjdQUlZnua+mIYw0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=IoLQvACFrJQrLnvSeXb7ba0JG6zF1U2tERRp+3UuykTB0qIA/mFA0AGt5Hx28xVHI hPco3amPn/tIzxPJfue3W7b41hNcIA2aBFoxILWwpkb31HmI6Jjvgi5sn8n5Onzjdx DZP80phWzzJl5KqNxUxKAVwEBAOBZ1JZ6WSV13U4= From: "jakub 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: Thu, 26 Mar 2020 16:41:11 +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: jakub 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: Thu, 26 Mar 2020 16:41:11 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94343 --- Comment #4 from Jakub Jelinek --- I was thinking about --- gcc/config/i386/sse.md.jj 2020-03-06 11:35:46.284074858 +0100 +++ gcc/config/i386/sse.md 2020-03-26 17:35:23.690515228 +0100 @@ -12800,10 +12800,18 @@ (xor:VI (match_operand:VI 1 "nonimmediate_operand" "vm") (match_operand:VI 2 "vector_all_ones_operand" "BC")))] "TARGET_AVX512F" - "vpternlog\t{$0x55, %1, %0, %0|%0, %0, %1, 0x55}" +{ + if (TARGET_AVX512VL) + return "vpternlog\t{$0x55, %1, %0, %0|%0, %0, %1, 0x55}"; + else + return "vpternlog\t{$0x55, %g1, %g0, %g0|%g0, %g0, %g1, 0x55}"; +} [(set_attr "type" "sselog") (set_attr "prefix" "evex") - (set_attr "mode" "")]) + (set (attr "mode") + (if_then_else (match_test "TARGET_AVX512VL") + (const_string "") + (const_string "XI")))]) (define_expand "_andnot3" [(set (match_operand:VI_AVX2 0 "register_operand") instead. I'm aware that from performance POV we are trying to avoid 512-bit vectors, but don't all such affected CPUs support AVX512VL already? Does K= NL care if it will do a 512-bit operation instead of 128-bit or 256-bit?=