]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Guard 64/32-bit vector move patterns with ix86_hard_reg_move_ok.
authorliuhongt <hongtao.liu@intel.com>
Mon, 21 Nov 2022 08:09:13 +0000 (16:09 +0800)
committerliuhongt <hongtao.liu@intel.com>
Tue, 22 Nov 2022 04:50:02 +0000 (12:50 +0800)
gcc/ChangeLog:

* config/i386/mmx.md (*mov<mode>_internal): Add
ix86_hard_reg_move_ok to condition.

gcc/config/i386/mmx.md

index d5134cc351efcf3233ba01eab24f9d42346e388c..63aff287795eca85bf7c99ecbc3ea42c6adee5c3 100644 (file)
        (match_operand:MMXMODE 1 "nonimm_or_0_operand"
     "rCo,rC,C,rm,rC,C  ,!y,m  ,?!y,?!y,r  ,C,v,m,v,v,r,*x,!y"))]
   "(TARGET_MMX || TARGET_MMX_WITH_SSE)
-   && !(MEM_P (operands[0]) && MEM_P (operands[1]))"
+   && !(MEM_P (operands[0]) && MEM_P (operands[1]))
+   && ix86_hardreg_mov_ok (operands[0], operands[1])"
 {
   switch (get_attr_type (insn))
     {
     "=r ,m ,v,v,v,m,r,v")
        (match_operand:V_32 1 "general_operand"
     "rmC,rC,C,v,m,v,v,r"))]
-  "!(MEM_P (operands[0]) && MEM_P (operands[1]))"
+  "!(MEM_P (operands[0]) && MEM_P (operands[1]))
+   && ix86_hardreg_mov_ok (operands[0], operands[1])"
 {
   switch (get_attr_type (insn))
     {