[llvm-commits] CVS: llvm/lib/Target/X86/X86InstrInfo.td

Evan Cheng evan.cheng at apple.com
Fri Dec 9 14:49:01 PST 2005



Changes in directory llvm/lib/Target/X86:

X86InstrInfo.td updated: 1.150 -> 1.151
---
Log message:

Added patterns for ADD8rm, etc. These fold load operands. e.g. addb 4(%esp), %al


---
Diffs of the changes:  (+6 -3)

 X86InstrInfo.td |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)


Index: llvm/lib/Target/X86/X86InstrInfo.td
diff -u llvm/lib/Target/X86/X86InstrInfo.td:1.150 llvm/lib/Target/X86/X86InstrInfo.td:1.151
--- llvm/lib/Target/X86/X86InstrInfo.td:1.150	Wed Dec  7 20:15:07 2005
+++ llvm/lib/Target/X86/X86InstrInfo.td	Fri Dec  9 16:48:48 2005
@@ -1165,11 +1165,14 @@
 } // end isConvertibleToThreeAddress
 } // end isCommutable
 def ADD8rm   : I<0x02, MRMSrcMem, (ops R8 :$dst, R8 :$src1, i8mem :$src2),
-                 "add{b} {$src2, $dst|$dst, $src2}", []>;
+                 "add{b} {$src2, $dst|$dst, $src2}",
+                 [(set R8:$dst, (add R8:$src1, (load addr:$src2)))]>;
 def ADD16rm  : I<0x03, MRMSrcMem, (ops R16:$dst, R16:$src1, i16mem:$src2),
-                 "add{w} {$src2, $dst|$dst, $src2}", []>, OpSize;
+                 "add{w} {$src2, $dst|$dst, $src2}",
+                 [(set R16:$dst, (add R16:$src1, (load addr:$src2)))]>, OpSize;
 def ADD32rm  : I<0x03, MRMSrcMem, (ops R32:$dst, R32:$src1, i32mem:$src2),
-                 "add{l} {$src2, $dst|$dst, $src2}", []>;
+                 "add{l} {$src2, $dst|$dst, $src2}",
+                 [(set R32:$dst, (add R32:$src1, (load addr:$src2)))]>;
 
 def ADD8ri   : Ii8<0x80, MRM0r, (ops R8:$dst, R8:$src1, i8imm:$src2),
                    "add{b} {$src2, $dst|$dst, $src2}",






More information about the llvm-commits mailing list