&& GET_MODE_BITSIZE (GET_MODE (exp)) > 128);
}
+/* Check if a 256bit or 512bit AVX register is referenced in stores. */
+
+static void
+ix86_check_avx_upper_stores (rtx dest, const_rtx, void *data)
+ {
+ if (ix86_check_avx_upper_register (dest))
+ {
+ bool *used = (bool *) data;
+ *used = true;
+ }
+ }
+
/* Return needed mode for entity in optimize_mode_switching pass. */
static int
}
}
+ /* Needed mode is set to AVX_U128_CLEAN if there are no 256bit
+ nor 512bit registers used in the function return register. */
+ bool avx_upper_reg_found = false;
+ note_stores (insn, ix86_check_avx_upper_stores,
+ &avx_upper_reg_found);
+ if (avx_upper_reg_found)
+ return AVX_U128_DIRTY;
+
/* If the function is known to preserve some SSE registers,
RA and previous passes can legitimately rely on that for
modes wider than 256 bits. It's only safe to issue a
return 0;
}
-/* Check if a 256bit or 512bit AVX register is referenced in stores. */
-
-static void
-ix86_check_avx_upper_stores (rtx dest, const_rtx, void *data)
- {
- if (ix86_check_avx_upper_register (dest))
- {
- bool *used = (bool *) data;
- *used = true;
- }
- }
-
/* Calculate mode of upper 128bit AVX registers after the insn. */
static int