[llvm-commits] [llvm] r99375 - /llvm/trunk/lib/Target/X86/X86InstrInfo.td
Chris Lattner
sabre at nondot.org
Tue Mar 23 18:02:12 PDT 2010
Author: lattner
Date: Tue Mar 23 20:02:12 2010
New Revision: 99375
URL: http://llvm.org/viewvc/llvm-project?rev=99375&view=rev
Log:
Switch INC8r to defining its pattern in terms of X86inc_flag
and defining the add pattern with Pat<>, eliminating a use of
parallel.
Modified:
llvm/trunk/lib/Target/X86/X86InstrInfo.td
Modified: llvm/trunk/lib/Target/X86/X86InstrInfo.td
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86InstrInfo.td?rev=99375&r1=99374&r2=99375&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86InstrInfo.td (original)
+++ llvm/trunk/lib/Target/X86/X86InstrInfo.td Tue Mar 23 20:02:12 2010
@@ -1698,8 +1698,8 @@
let Defs = [EFLAGS] in {
let CodeSize = 2 in
def INC8r : I<0xFE, MRM0r, (outs GR8 :$dst), (ins GR8 :$src), "inc{b}\t$dst",
- [(set GR8:$dst, (add GR8:$src, 1)),
- (implicit EFLAGS)]>;
+ [(set GR8:$dst, EFLAGS, (X86inc_flag GR8:$src))]>;
+
let isConvertibleToThreeAddress = 1, CodeSize = 1 in { // Can xform into LEA.
def INC16r : I<0x40, AddRegFrm, (outs GR16:$dst), (ins GR16:$src),
"inc{w}\t$dst",
@@ -4875,8 +4875,8 @@
}
// INC and DEC with EFLAGS result. Note that these do not set CF.
-def : Pat<(parallel (X86inc_flag GR8:$src), (implicit EFLAGS)),
- (INC8r GR8:$src)>;
+def : Pat<(add GR8:$src, 1), (INC8r GR8:$src)>;
+
def : Pat<(parallel (X86dec_flag GR8:$src), (implicit EFLAGS)),
(DEC8r GR8:$src)>;
More information about the llvm-commits
mailing list