[llvm] r262309 - [X86] Be consistent about using pre/post increment/decrement in nearby code. NFC

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 29 22:42:46 PST 2016


Author: ctopper
Date: Tue Mar  1 00:42:46 2016
New Revision: 262309

URL: http://llvm.org/viewvc/llvm-project?rev=262309&view=rev
Log:
[X86] Be consistent about using pre/post increment/decrement in nearby code. NFC

Modified:
    llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp

Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp?rev=262309&r1=262308&r2=262309&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp (original)
+++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp Tue Mar  1 00:42:46 2016
@@ -1312,7 +1312,7 @@ encodeInstruction(const MCInst &MI, raw_
     SrcRegNum = CurOp + 1;
 
     if (HasEVEX_K) // Skip writemask
-      SrcRegNum++;
+      ++SrcRegNum;
 
     if (HasVEX_4V) // Skip 1st src (which is encoded in VEX_VVVV)
       ++SrcRegNum;
@@ -1327,7 +1327,7 @@ encodeInstruction(const MCInst &MI, raw_
     SrcRegNum = CurOp + X86::AddrNumOperands;
 
     if (HasEVEX_K) // Skip writemask
-      SrcRegNum++;
+      ++SrcRegNum;
 
     if (HasVEX_4V) // Skip 1st src (which is encoded in VEX_VVVV)
       ++SrcRegNum;
@@ -1343,7 +1343,7 @@ encodeInstruction(const MCInst &MI, raw_
     SrcRegNum = CurOp + 1;
 
     if (HasEVEX_K) // Skip writemask
-      SrcRegNum++;
+      ++SrcRegNum;
 
     if (HasVEX_4V) // Skip 1st src (which is encoded in VEX_VVVV)
       ++SrcRegNum;
@@ -1360,7 +1360,7 @@ encodeInstruction(const MCInst &MI, raw_
       ++CurOp;
     // do not count the rounding control operand
     if (HasEVEX_RC)
-      NumOps--;
+      --NumOps;
     break;
 
   case X86II::MRMSrcMem: {




More information about the llvm-commits mailing list