From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1506B384607A; Wed, 3 Apr 2024 17:46:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1506B384607A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1712166404; bh=WkIv9nVOWTAGFHetDi5H/iwT48/aJYb1LPOoBzjsX0U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=araNSJRdypFW8UvEihY6xxBwsTAvMc3KiCzWfLy9FBq7KIbV9GftPjGt3cVCEqxI7 6mKaI0t65DckeeAS8xIelJQrYy4iqD3OzX9z1Bz7fZo6LVNpkSilsT0ya1+YkYAO0v zP6jRCjVqcu+SRahy+j575OhNzoaPQJhzAzbiS6g= From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/114576] [14 regression][config/i386] GCC 14/trunk emits VEX-prefixed AES instruction without AVX enabled Date: Wed, 03 Apr 2024 17:46:43 +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: 14.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia 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: 14.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: everconfirmed cf_reconfirmed_on bug_status 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=3D114576 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Last reconfirmed| |2024-04-03 Status|UNCONFIRMED |NEW --- Comment #2 from Andrew Pinski --- Something like this should fix it (but I am not 100% sure it is correct nor= can I test it): ``` apinski@xeond:~/src/upstream-gcc-match/gcc/gcc/config/i386$ git diff diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 6ac401154e4..82cf92653f4 100644 --- a/gcc/config/i386/i386.md +++ b/gcc/config/i386/i386.md @@ -916,6 +916,7 @@ (define_attr "enabled" "" (eq_attr "isa" "x64_avx512dq") (symbol_ref "TARGET_64BIT && TARGET_AVX512DQ") (eq_attr "isa" "aes") (symbol_ref "TARGET_AES") + (eq_attr "isa" "vaes") (symbol_ref "TARGET_VAES") (eq_attr "isa" "sse_noavx") (symbol_ref "TARGET_SSE && !TARGET_AVX") (eq_attr "isa" "sse2") (symbol_ref "TARGET_SSE2") diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md index 3286d3a4fac..af79f3b126d 100644 --- a/gcc/config/i386/sse.md +++ b/gcc/config/i386/sse.md @@ -26286,7 +26286,7 @@ (define_insn "aesenc" aesenc\t{%2, %0|%0, %2} vaesenc\t{%2, %1, %0|%0, %1, %2} vaesenc\t{%2, %1, %0|%0, %1, %2}" - [(set_attr "isa" "noavx,aes,avx512vl") + [(set_attr "isa" "noavx,vaes,avx512vl") (set_attr "type" "sselog1") (set_attr "addr" "gpr16,*,*") (set_attr "prefix_extra" "1") @@ -26304,7 +26304,7 @@ (define_insn "aesenclast" aesenclast\t{%2, %0|%0, %2} vaesenclast\t{%2, %1, %0|%0, %1, %2} vaesenclast\t{%2, %1, %0|%0, %1, %2}" - [(set_attr "isa" "noavx,aes,avx512vl") + [(set_attr "isa" "noavx,vaes,avx512vl") (set_attr "type" "sselog1") (set_attr "addr" "gpr16,*,*") (set_attr "prefix_extra" "1") @@ -26322,7 +26322,7 @@ (define_insn "aesdec" aesdec\t{%2, %0|%0, %2} vaesdec\t{%2, %1, %0|%0, %1, %2} vaesdec\t{%2, %1, %0|%0, %1, %2}" - [(set_attr "isa" "noavx,aes,avx512vl") + [(set_attr "isa" "noavx,vaes,avx512vl") (set_attr "type" "sselog1") (set_attr "addr" "gpr16,*,*") (set_attr "prefix_extra" "1") @@ -26340,7 +26340,7 @@ (define_insn "aesdeclast" aesdeclast\t{%2, %0|%0, %2} vaesdeclast\t{%2, %1, %0|%0, %1, %2} vaesdeclast\t{%2, %1, %0|%0, %1, %2}" - [(set_attr "isa" "noavx,aes,avx512vl") + [(set_attr "isa" "noavx,vaes,avx512vl") (set_attr "addr" "gpr16,*,*") (set_attr "type" "sselog1") (set_attr "prefix_extra" "1") ```=