aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2023-10-24 11:03:21 +0100
committerRichard Sandiford <richard.sandiford@arm.com>2023-10-24 11:03:21 +0100
commitcc4779559bea982f9307a8bc1cb017b8eda28d6d (patch)
tree1a78bb131f4d7cc5aa643b5f1b166eb9797692e6
parent21416caf221fae4351319ef8ca8d41c0234bdfa7 (diff)
downloadgcc-cc4779559bea982f9307a8bc1cb017b8eda28d6d.zip
gcc-cc4779559bea982f9307a8bc1cb017b8eda28d6d.tar.gz
gcc-cc4779559bea982f9307a8bc1cb017b8eda28d6d.tar.bz2
i386: Fix unprotected REGNO in aeswidekl_operation
I hit an ICE in aeswidekl_operation while testing the late-combine pass on x86. The predicate tested REGNO without first testing REG_P. gcc/ * config/i386/predicates.md (aeswidekl_operation): Protect REGNO check with REG_P.
-rw-r--r--gcc/config/i386/predicates.md1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/config/i386/predicates.md b/gcc/config/i386/predicates.md
index ef49efd..e3d55f0 100644
--- a/gcc/config/i386/predicates.md
+++ b/gcc/config/i386/predicates.md
@@ -2260,6 +2260,7 @@
|| GET_CODE (SET_SRC (elt)) != UNSPEC_VOLATILE
|| GET_MODE (SET_SRC (elt)) != V2DImode
|| XVECLEN (SET_SRC (elt), 0) != 1
+ || !REG_P (XVECEXP (SET_SRC (elt), 0, 0))
|| REGNO (XVECEXP (SET_SRC (elt), 0, 0)) != GET_SSE_REGNO (i))
return false;
}