[llvm] r338806 - [X86] Add R13D to the isInefficientLEAReg in FixupLEAs.

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 2 20:45:19 PDT 2018


Author: ctopper
Date: Thu Aug  2 20:45:19 2018
New Revision: 338806

URL: http://llvm.org/viewvc/llvm-project?rev=338806&view=rev
Log:
[X86] Add R13D to the isInefficientLEAReg in FixupLEAs.

I'm assuming the R13 restriction extends to R13D. Guessing this restriction is related to the funny encoding of this register as base always requiring a displacement to be encoded.

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

Modified: llvm/trunk/lib/Target/X86/X86FixupLEAs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FixupLEAs.cpp?rev=338806&r1=338805&r2=338806&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FixupLEAs.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FixupLEAs.cpp Thu Aug  2 20:45:19 2018
@@ -278,7 +278,8 @@ static inline bool isLEA(const int Opcod
 }
 
 static inline bool isInefficientLEAReg(unsigned int Reg) {
-  return Reg == X86::EBP || Reg == X86::RBP || Reg == X86::R13;
+  return Reg == X86::EBP || Reg == X86::RBP ||
+         Reg == X86::R13D || Reg == X86::R13;
 }
 
 static inline bool isRegOperand(const MachineOperand &Op) {




More information about the llvm-commits mailing list