]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
i386: Fix array index in expander
authorNathan Sidwell <nathan@acm.org>
Fri, 11 Sep 2020 21:13:52 +0000 (14:13 -0700)
committerNathan Sidwell <nathan@acm.org>
Mon, 14 Sep 2020 12:14:14 +0000 (05:14 -0700)
I noticed a compiler warning about out-of-bound access.  Fixed thusly.

gcc/
* config/i386/sse.md (mov<mode>): Fix operand indices.

gcc/config/i386/sse.md

index b8c2ca7ec04ff3a5035b65c3e7ff813e61121f00..eb6a906c8b2c6c01868e1c219b226c51dd64fad8 100644 (file)
        (match_operand:MASK_DWI 1 "nonimmediate_operand"))]
   "TARGET_AVX512VP2INTERSECT"
 {
-  if (MEM_P (operands[1]) && MEM_P (operands[2]))
+  if (MEM_P (operands[0]) && MEM_P (operands[1]))
     operands[1] = force_reg (<MODE>mode, operands[1]);
 })