aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2024-10-08 16:05:33 +0200
committerJan Beulich <jbeulich@suse.com>2024-10-08 16:05:33 +0200
commit0ab66f099bf0f405542944c5ce178151bea934b2 (patch)
treea0a6c5d44c163dce97119f2375fac5ce7bba7c1e
parentc94adf02d31028a25bb7b20ec77aade9d502430b (diff)
downloadgcc-0ab66f099bf0f405542944c5ce178151bea934b2.zip
gcc-0ab66f099bf0f405542944c5ce178151bea934b2.tar.gz
gcc-0ab66f099bf0f405542944c5ce178151bea934b2.tar.bz2
x86/{,V}AES: adjust when to force EVEX encoding
Commit a79d13a01f8c ("i386: Fix aes/vaes patterns [PR114576]") correctly said "..., but we need to emit {evex} prefix in the assembly if AES ISA is not enabled". Yet it did so only for the TARGET_AES insns. Going from the alternative chosen in the TARGET_VAES insns isn't quite right: If AES is (also) enabled, EVEX encoding would needlessly be forced. gcc/ * config/i386/sse.md (vaesdec_<mode>, vaesdeclast_<mode>, vaesenc_<mode>, vaesenclast_<mode>): Replace which_alternative check by TARGET_AES one.
-rw-r--r--gcc/config/i386/sse.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/config/i386/sse.md b/gcc/config/i386/sse.md
index d6e2135..ccef3e0 100644
--- a/gcc/config/i386/sse.md
+++ b/gcc/config/i386/sse.md
@@ -30803,7 +30803,7 @@
UNSPEC_VAESDEC))]
"TARGET_VAES"
{
- if (which_alternative == 0 && <MODE>mode == V16QImode)
+ if (!TARGET_AES && <MODE>mode == V16QImode)
return "%{evex%} vaesdec\t{%2, %1, %0|%0, %1, %2}";
else
return "vaesdec\t{%2, %1, %0|%0, %1, %2}";
@@ -30817,7 +30817,7 @@
UNSPEC_VAESDECLAST))]
"TARGET_VAES"
{
- if (which_alternative == 0 && <MODE>mode == V16QImode)
+ if (!TARGET_AES && <MODE>mode == V16QImode)
return "%{evex%} vaesdeclast\t{%2, %1, %0|%0, %1, %2}";
else
return "vaesdeclast\t{%2, %1, %0|%0, %1, %2}";
@@ -30831,7 +30831,7 @@
UNSPEC_VAESENC))]
"TARGET_VAES"
{
- if (which_alternative == 0 && <MODE>mode == V16QImode)
+ if (!TARGET_AES && <MODE>mode == V16QImode)
return "%{evex%} vaesenc\t{%2, %1, %0|%0, %1, %2}";
else
return "vaesenc\t{%2, %1, %0|%0, %1, %2}";
@@ -30845,7 +30845,7 @@
UNSPEC_VAESENCLAST))]
"TARGET_VAES"
{
- if (which_alternative == 0 && <MODE>mode == V16QImode)
+ if (!TARGET_AES && <MODE>mode == V16QImode)
return "%{evex%} vaesenclast\t{%2, %1, %0|%0, %1, %2}";
else
return "vaesenclast\t{%2, %1, %0|%0, %1, %2}";