]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386: Fix unprotected REGNO in aeswidekl_operation
authorRichard Sandiford <richard.sandiford@arm.com>
Tue, 24 Oct 2023 10:03:21 +0000 (11:03 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Tue, 24 Oct 2023 10:03:21 +0000 (11:03 +0100)
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.

gcc/config/i386/predicates.md

index ef49efdbde580eb8dc6d530e3e5443c1dfbc9643..e3d55f0c502223b4b56d7629459883c0ae8c69da 100644 (file)
          || 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;
     }