diff options
author | Evan Cheng <evan.cheng@apple.com> | 2010-12-15 22:57:36 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2010-12-15 22:57:36 +0000 |
commit | f735f2da6e2a2c7efa856e8cfb16cb0813f5fe1d (patch) | |
tree | ff9a982943ada910ae55c6714299ca9f90dddfa8 /lib/Target/X86/X86InstrCompiler.td | |
parent | c42a7754bb6249c33c509e6fa6e8b3c9344e72d8 (diff) | |
download | external_llvm-f735f2da6e2a2c7efa856e8cfb16cb0813f5fe1d.zip external_llvm-f735f2da6e2a2c7efa856e8cfb16cb0813f5fe1d.tar.gz external_llvm-f735f2da6e2a2c7efa856e8cfb16cb0813f5fe1d.tar.bz2 |
Only rr forms of ADD*_DB are commutable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121908 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86InstrCompiler.td')
-rw-r--r-- | lib/Target/X86/X86InstrCompiler.td | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Target/X86/X86InstrCompiler.td b/lib/Target/X86/X86InstrCompiler.td index 4773745..2b1ea9c 100644 --- a/lib/Target/X86/X86InstrCompiler.td +++ b/lib/Target/X86/X86InstrCompiler.td @@ -1038,8 +1038,9 @@ def or_is_add : PatFrag<(ops node:$lhs, node:$rhs), (or node:$lhs, node:$rhs),[{ // (or x1, x2) -> (add x1, x2) if two operands are known not to share bits. let AddedComplexity = 5 in { // Try this before the selecting to OR -let isCommutable = 1, isConvertibleToThreeAddress = 1, +let isConvertibleToThreeAddress = 1, Constraints = "$src1 = $dst", Defs = [EFLAGS] in { +let isCommutable = 1 in { def ADD16rr_DB : I<0, Pseudo, (outs GR16:$dst), (ins GR16:$src1, GR16:$src2), "", // orw/addw REG, REG [(set GR16:$dst, (or_is_add GR16:$src1, GR16:$src2))]>; @@ -1049,6 +1050,7 @@ def ADD32rr_DB : I<0, Pseudo, (outs GR32:$dst), (ins GR32:$src1, GR32:$src2), def ADD64rr_DB : I<0, Pseudo, (outs GR64:$dst), (ins GR64:$src1, GR64:$src2), "", // orq/addq REG, REG [(set GR64:$dst, (or_is_add GR64:$src1, GR64:$src2))]>; +} // isCommutable // NOTE: These are order specific, we want the ri8 forms to be listed // first so that they are slightly preferred to the ri forms. |