[llvm-commits] [llvm] r42653 - /llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
Evan Cheng
evan.cheng at apple.com
Fri Oct 5 14:55:32 PDT 2007
Author: evancheng
Date: Fri Oct 5 16:55:32 2007
New Revision: 42653
URL: http://llvm.org/viewvc/llvm-project?rev=42653&view=rev
Log:
INC64_32r -> LEA64_32r is better than INC64_32r -> LEA32r, but it still can
cause performance degradation.
Modified:
llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.cpp?rev=42653&r1=42652&r2=42653&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.cpp Fri Oct 5 16:55:32 2007
@@ -283,11 +283,9 @@
switch (MIOpc) {
default: return 0;
case X86::INC64r:
- case X86::INC32r:
- case X86::INC64_32r: {
+ case X86::INC32r: {
assert(MI->getNumOperands() >= 2 && "Unknown inc instruction!");
- unsigned Opc = MIOpc == X86::INC64r ? X86::LEA64r
- : (MIOpc == X86::INC64_32r ? X86::LEA64_32r : X86::LEA32r);
+ unsigned Opc = MIOpc == X86::INC64r ? X86::LEA64r : X86::LEA32r;
NewMI = addRegOffset(BuildMI(get(Opc), Dest), Src, 1);
break;
}
@@ -298,11 +296,9 @@
NewMI = addRegOffset(BuildMI(get(X86::LEA16r), Dest), Src, 1);
break;
case X86::DEC64r:
- case X86::DEC32r:
- case X86::DEC64_32r: {
+ case X86::DEC32r: {
assert(MI->getNumOperands() >= 2 && "Unknown dec instruction!");
- unsigned Opc = MIOpc == X86::DEC64r ? X86::LEA64r
- : (MIOpc == X86::DEC64_32r ? X86::LEA64_32r : X86::LEA32r);
+ unsigned Opc = MIOpc == X86::DEC64r ? X86::LEA64r : X86::LEA32r;
NewMI = addRegOffset(BuildMI(get(Opc), Dest), Src, -1);
break;
}
More information about the llvm-commits
mailing list