[llvm-commits] CVS: llvm/lib/Target/X86/PeepholeOptimizer.cpp X86InstrInfo.td X86RegisterInfo.cpp
Alkis Evlogimenos
alkis at cs.uiuc.edu
Fri Apr 2 01:12:02 PST 2004
Changes in directory llvm/lib/Target/X86:
PeepholeOptimizer.cpp updated: 1.31 -> 1.32
X86InstrInfo.td updated: 1.64 -> 1.65
X86RegisterInfo.cpp updated: 1.79 -> 1.80
---
Log message:
Add more ADC and SBB variants
---
Diffs of the changes: (+24 -11)
Index: llvm/lib/Target/X86/PeepholeOptimizer.cpp
diff -u llvm/lib/Target/X86/PeepholeOptimizer.cpp:1.31 llvm/lib/Target/X86/PeepholeOptimizer.cpp:1.32
--- llvm/lib/Target/X86/PeepholeOptimizer.cpp:1.31 Sun Feb 29 02:50:03 2004
+++ llvm/lib/Target/X86/PeepholeOptimizer.cpp Fri Apr 2 01:11:10 2004
@@ -123,8 +123,8 @@
return false;
#endif
- case X86::ADD16ri: case X86::ADD32ri:
- case X86::SUB16ri: case X86::SUB32ri:
+ case X86::ADD16ri: case X86::ADD32ri: case X86::ADC32ri:
+ case X86::SUB16ri: case X86::SUB32ri: case X86::SBB32ri:
case X86::AND16ri: case X86::AND32ri:
case X86::OR16ri: case X86::OR32ri:
case X86::XOR16ri: case X86::XOR32ri:
@@ -138,8 +138,10 @@
default: assert(0 && "Unknown opcode value!");
case X86::ADD16ri: Opcode = X86::ADD16ri8; break;
case X86::ADD32ri: Opcode = X86::ADD32ri8; break;
+ case X86::ADC32ri: Opcode = X86::ADC32ri8; break;
case X86::SUB16ri: Opcode = X86::SUB16ri8; break;
case X86::SUB32ri: Opcode = X86::SUB32ri8; break;
+ case X86::SBB32ri: Opcode = X86::SBB32ri8; break;
case X86::AND16ri: Opcode = X86::AND16ri8; break;
case X86::AND32ri: Opcode = X86::AND32ri8; break;
case X86::OR16ri: Opcode = X86::OR16ri8; break;
@@ -156,8 +158,8 @@
}
return false;
- case X86::ADD16mi: case X86::ADD32mi:
- case X86::SUB16mi: case X86::SUB32mi:
+ case X86::ADD16mi: case X86::ADD32mi: case X86::ADC32mi:
+ case X86::SUB16mi: case X86::SUB32mi: case X86::SBB32mi:
case X86::AND16mi: case X86::AND32mi:
case X86::OR16mi: case X86::OR32mi:
case X86::XOR16mi: case X86::XOR32mi:
@@ -171,8 +173,10 @@
default: assert(0 && "Unknown opcode value!");
case X86::ADD16mi: Opcode = X86::ADD16mi8; break;
case X86::ADD32mi: Opcode = X86::ADD32mi8; break;
+ case X86::ADC32mi: Opcode = X86::ADC32mi8; break;
case X86::SUB16mi: Opcode = X86::SUB16mi8; break;
case X86::SUB32mi: Opcode = X86::SUB32mi8; break;
+ case X86::SBB32mi: Opcode = X86::SBB32mi8; break;
case X86::AND16mi: Opcode = X86::AND16mi8; break;
case X86::AND32mi: Opcode = X86::AND32mi8; break;
case X86::OR16mi: Opcode = X86::OR16mi8; break;
Index: llvm/lib/Target/X86/X86InstrInfo.td
diff -u llvm/lib/Target/X86/X86InstrInfo.td:1.64 llvm/lib/Target/X86/X86InstrInfo.td:1.65
--- llvm/lib/Target/X86/X86InstrInfo.td:1.64 Wed Mar 31 16:02:13 2004
+++ llvm/lib/Target/X86/X86InstrInfo.td Fri Apr 2 01:11:10 2004
@@ -531,10 +531,13 @@
def ADD16mi8 : Im16i8<"add", 0x83, MRM0m >, OpSize; // [mem16] += I8
def ADD32mi8 : Im32i8<"add", 0x83, MRM0m >; // [mem32] += I8
-def ADC32rr : I <"adc", 0x11, MRMDestReg>; // R32 += R32+Carry
-def ADC32rm : Im32 <"adc", 0x11, MRMSrcMem >; // R32 += [mem32]+Carry
-def ADC32mr : Im32 <"adc", 0x13, MRMDestMem>; // [mem32] += R32+Carry
-
+def ADC32rr : I <"adc", 0x11, MRMDestReg>; // R32 += R32+Carry
+def ADC32rm : Im32 <"adc", 0x11, MRMSrcMem >; // R32 += [mem32]+Carry
+def ADC32mr : Im32 <"adc", 0x13, MRMDestMem>; // [mem32] += R32+Carry
+def ADC32ri : Ii32 <"adc", 0x81, MRM2r >; // R32 += I32+Carry
+def ADC32ri8 : Ii8 <"adc", 0x83, MRM2r >; // R32 += I8+Carry
+def ADC32mi : Im32i32<"adc", 0x81, MRM2m >; // [mem32] += I32+Carry
+def ADC32mi8 : Im32i8 <"adc", 0x83, MRM2m >; // [mem32[ += I8+Carry
def SUB8rr : I <"sub", 0x28, MRMDestReg>, Pattern<(set R8 , (minus R8 , R8 ))>;
def SUB16rr : I <"sub", 0x29, MRMDestReg>, OpSize, Pattern<(set R16, (minus R16, R16))>;
@@ -558,9 +561,13 @@
def SUB16mi8 : Im16i8<"sub", 0x83, MRM5m >, OpSize; // [mem16] -= I8
def SUB32mi8 : Im32i8<"sub", 0x83, MRM5m >; // [mem32] -= I8
-def SBB32rr : I <"sbb", 0x19, MRMDestReg>; // R32 -= R32+Borrow
-def SBB32rm : Im32 <"sbb", 0x19, MRMSrcMem >; // R32 -= [mem32]+Borrow
-def SBB32mr : Im32 <"sbb", 0x1B, MRMDestMem>; // [mem32] -= R32+Borrow
+def SBB32rr : I <"sbb", 0x19, MRMDestReg>; // R32 -= R32+Borrow
+def SBB32rm : Im32 <"sbb", 0x19, MRMSrcMem >; // R32 -= [mem32]+Borrow
+def SBB32mr : Im32 <"sbb", 0x1B, MRMDestMem>; // [mem32] -= R32+Borrow
+def SBB32ri : Ii32 <"adc", 0x81, MRM3r >; // R32 -= I32+Borrow
+def SBB32ri8 : Ii8 <"adc", 0x83, MRM3r >; // R32 -= I8+Borrow
+def SBB32mi : Im32i32<"adc", 0x81, MRM3m >; // [mem32] -= I32+Borrow
+def SBB32mi8 : Im32i8 <"adc", 0x83, MRM3m >; // [mem32[ -= I8+Borrow
def IMUL16rr : I <"imul", 0xAF, MRMSrcReg>, TB, OpSize, Pattern<(set R16, (times R16, R16))>;
def IMUL32rr : I <"imul", 0xAF, MRMSrcReg>, TB , Pattern<(set R32, (times R32, R32))>;
Index: llvm/lib/Target/X86/X86RegisterInfo.cpp
diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.79 llvm/lib/Target/X86/X86RegisterInfo.cpp:1.80
--- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.79 Tue Mar 30 15:29:47 2004
+++ llvm/lib/Target/X86/X86RegisterInfo.cpp Fri Apr 2 01:11:10 2004
@@ -176,6 +176,7 @@
case X86::ADD16rr: return MakeMRInst(X86::ADD16mr, FrameIndex, MI);
case X86::ADD32rr: return MakeMRInst(X86::ADD32mr, FrameIndex, MI);
case X86::ADC32rr: return MakeMRInst(X86::ADC32mr, FrameIndex, MI);
+ case X86::ADC32ri: return MakeMIInst(X86::ADC32mi, FrameIndex, MI);
case X86::ADD8ri: return MakeMIInst(X86::ADD8mi , FrameIndex, MI);
case X86::ADD16ri: return MakeMIInst(X86::ADD16mi, FrameIndex, MI);
case X86::ADD32ri: return MakeMIInst(X86::ADD32mi, FrameIndex, MI);
@@ -183,6 +184,7 @@
case X86::SUB16rr: return MakeMRInst(X86::SUB16mr, FrameIndex, MI);
case X86::SUB32rr: return MakeMRInst(X86::SUB32mr, FrameIndex, MI);
case X86::SBB32rr: return MakeMRInst(X86::SBB32mr, FrameIndex, MI);
+ case X86::SBB32ri: return MakeMIInst(X86::SBB32mi, FrameIndex, MI);
case X86::SUB8ri: return MakeMIInst(X86::SUB8mi , FrameIndex, MI);
case X86::SUB16ri: return MakeMIInst(X86::SUB16mi, FrameIndex, MI);
case X86::SUB32ri: return MakeMIInst(X86::SUB32mi, FrameIndex, MI);
More information about the llvm-commits
mailing list