diff options
author | Craig Topper <craig.topper@gmail.com> | 2013-10-05 17:17:53 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2013-10-05 17:17:53 +0000 |
commit | e2522fd06c0844c7083cc2cbd3ad0aae960e4a00 (patch) | |
tree | ce2b0be775399f93bde3ea7d5761813ddabf918c /lib/Target/X86/X86InstrInfo.td | |
parent | 5e195a4c8d8cd4498ab7e0aa16a3b6f273daf457 (diff) | |
download | external_llvm-e2522fd06c0844c7083cc2cbd3ad0aae960e4a00.zip external_llvm-e2522fd06c0844c7083cc2cbd3ad0aae960e4a00.tar.gz external_llvm-e2522fd06c0844c7083cc2cbd3ad0aae960e4a00.tar.bz2 |
Add an additional pattern for BLCI since opt can turn (not (add x, 1)) into (sub -2, x).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192037 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86InstrInfo.td')
-rw-r--r-- | lib/Target/X86/X86InstrInfo.td | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/X86/X86InstrInfo.td b/lib/Target/X86/X86InstrInfo.td index be35187..02ad169 100644 --- a/lib/Target/X86/X86InstrInfo.td +++ b/lib/Target/X86/X86InstrInfo.td @@ -2014,6 +2014,12 @@ let Predicates = [HasTBM] in { def : Pat<(or GR64:$src, (not (add GR64:$src, 1))), (BLCI_64rr GR64:$src)>; + // Extra patterns because opt can optimize the above patterns to this. + def : Pat<(or GR32:$src, (sub -2, GR32:$src)), + (BLCI_32rr GR32:$src)>; + def : Pat<(or GR64:$src, (sub -2, GR64:$src)), + (BLCI_64rr GR64:$src)>; + def : Pat<(and (not GR32:$src), (add GR32:$src, 1)), (BLCIC_32rr GR32:$src)>; def : Pat<(and (not GR64:$src), (add GR64:$src, 1)), |