https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92865

--- Comment #3 from Hongtao.liu <crazylht at gmail dot com> ---
Since TARGET_XOP only supports 128-bit vector compare, ix86_valid_mask_cmp_mode
should also handle 256/512-bit vector compare when avx512f is avalable.


untested patch

@@ -3428,7 +3428,7 @@ static bool
 ix86_valid_mask_cmp_mode (machine_mode mode)
 {
   /* XOP has its own vector conditional movement.  */
-  if (TARGET_XOP)
+  if (TARGET_XOP && GET_MODE_SIZE (mode) == 128)
     return false;

   /* AVX512F is needed for mask operation.  */

I'll add some testcase later.

Reply via email to