[llvm] [X86] Support EVEX compression from MOVBErr to BSWAP (PR #79775)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 29 22:44:35 PST 2024


================
@@ -225,8 +225,11 @@ static bool CompressEVEXImpl(MachineInstr &MI, const X86Subtarget &ST) {
   //
   // For AVX512 cases, EVEX prefix is needed in order to carry this information
   // thus preventing the transformation to VEX encoding.
-  bool IsND = X86II::hasNewDataDest(TSFlags);
-  if (TSFlags & X86II::EVEX_B)
+  // MOVBE*rr is special because it has semantic of NDD but not set EVEX_B.
+  bool IsMovberr =
+      MI.getOpcode() == X86::MOVBE32rr || MI.getOpcode() == X86::MOVBE64rr;
+  bool IsND = X86II::hasNewDataDest(TSFlags) || IsMovberr;
+  if (TSFlags & X86II::EVEX_B || IsMovberr)
----------------
XinWang10 wrote:

done

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


More information about the llvm-commits mailing list