[llvm] r339498 - [X86] Add the mem-reg form of CMP to the macro fusion shouldScheduleAdjacent.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 10 23:42:50 PDT 2018


Author: ctopper
Date: Fri Aug 10 23:42:50 2018
New Revision: 339498

URL: http://llvm.org/viewvc/llvm-project?rev=339498&view=rev
Log:
[X86] Add the mem-reg form of CMP to the macro fusion shouldScheduleAdjacent.

Unlike the other arithmetic instructions the mem-reg form of compare is just a load and not a RMW operation. According to the Intel optimization manual, this form is also supported by macro fusion.

Modified:
    llvm/trunk/lib/Target/X86/X86MacroFusion.cpp

Modified: llvm/trunk/lib/Target/X86/X86MacroFusion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86MacroFusion.cpp?rev=339498&r1=339497&r2=339498&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86MacroFusion.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86MacroFusion.cpp Fri Aug 10 23:42:50 2018
@@ -111,20 +111,24 @@ static bool shouldScheduleAdjacent(const
   case X86::CMP16ri8:
   case X86::CMP16rm:
   case X86::CMP16rr:
+  case X86::CMP16mr:
   case X86::CMP32i32:
   case X86::CMP32ri:
   case X86::CMP32ri8:
   case X86::CMP32rm:
   case X86::CMP32rr:
+  case X86::CMP32mr:
   case X86::CMP64i32:
   case X86::CMP64ri32:
   case X86::CMP64ri8:
   case X86::CMP64rm:
   case X86::CMP64rr:
+  case X86::CMP64mr:
   case X86::CMP8i8:
   case X86::CMP8ri:
   case X86::CMP8rm:
   case X86::CMP8rr:
+  case X86::CMP8mr:
   case X86::ADD16i16:
   case X86::ADD16ri:
   case X86::ADD16ri8:




More information about the llvm-commits mailing list