aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-24 01:02:12 +0000
committerChris Lattner <sabre@nondot.org>2010-03-24 01:02:12 +0000
commitb7e449e490eab17e73a420bded016f93e9beed66 (patch)
tree3444bc31634dd57eb9ba43616cc70d364dcd6bee
parentee4e0fd45a7c4ee58e5dbe6809338f44db5978b7 (diff)
downloadexternal_llvm-b7e449e490eab17e73a420bded016f93e9beed66.zip
external_llvm-b7e449e490eab17e73a420bded016f93e9beed66.tar.gz
external_llvm-b7e449e490eab17e73a420bded016f93e9beed66.tar.bz2
Switch INC8r to defining its pattern in terms of X86inc_flag
and defining the add pattern with Pat<>, eliminating a use of parallel. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99375 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/X86/X86InstrInfo.td8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td
index 3ee37d6..92ff279 100644
--- a/lib/Target/X86/X86InstrInfo.td
+++ b/lib/Target/X86/X86InstrInfo.td
@@ -1698,8 +1698,8 @@ let isTwoAddress = 0 in {
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 @@ def : Pat<(parallel (X86smul_flag GR32:$src1, 2),
}
// 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)>;