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

Shengchen Kan via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 26 23:43:03 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)) {
----------------
KanRobert wrote:

Should we update `X86TTIImpl::getRegisterBitWidth` too?

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


More information about the llvm-commits mailing list