[llvm] [X86][EVEX512] Do not allow 512-bit memcpy without EVEX512 (PR #70420)

Phoebe Wang via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 26 23:52:38 PDT 2023


================
@@ -281,7 +281,7 @@ EVT X86TargetLowering::getOptimalMemOpType(
     if (Op.size() >= 16 &&
         (!Subtarget.isUnalignedMem16Slow() || Op.isAligned(Align(16)))) {
       // FIXME: Check if unaligned 64-byte accesses are slow.
-      if (Op.size() >= 64 && Subtarget.hasAVX512() &&
+      if (Op.size() >= 64 && Subtarget.hasAVX512() && Subtarget.hasEVEX512() &&
           (Subtarget.getPreferVectorWidth() >= 512)) {
----------------
phoebewang wrote:

Good idea, done.

https://github.com/llvm/llvm-project/pull/70420


More information about the llvm-commits mailing list