summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-04-18 06:36:55 +0000
committerChris Lattner <sabre@nondot.org>2011-04-18 06:36:55 +0000
commit80254a53cc428b59bada353ab552af466bc5c63b (patch)
treebd275d48dfab0aa5b26ceae0796c772409f3d5f6 /llvm/lib
parent07add49a4ba2b296ad1da2aa0eeb51e0edbd7ec4 (diff)
downloadbcm5719-llvm-80254a53cc428b59bada353ab552af466bc5c63b.tar.gz
bcm5719-llvm-80254a53cc428b59bada353ab552af466bc5c63b.zip
Add a new bit that ImmLeaf's can opt into, which allows them to duck out of
the generated FastISel. X86 doesn't need to generate code to match ADD16ri8 since ADD16ri will do just fine. This is a small codesize win in the generated instruction selector. llvm-svn: 129692
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86InstrInfo.td9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.td b/llvm/lib/Target/X86/X86InstrInfo.td
index c278e0921ec..2b928727f37 100644
--- a/llvm/lib/Target/X86/X86InstrInfo.td
+++ b/llvm/lib/Target/X86/X86InstrInfo.td
@@ -481,9 +481,12 @@ def X86_COND_O : PatLeaf<(i8 13)>;
def X86_COND_P : PatLeaf<(i8 14)>; // alt. COND_PE
def X86_COND_S : PatLeaf<(i8 15)>;
-def i16immSExt8 : ImmLeaf<i16, [{ return Imm == (char)Imm; }]>;
-def i32immSExt8 : ImmLeaf<i32, [{ return Imm == (char)Imm; }]>;
-def i64immSExt8 : ImmLeaf<i64, [{ return Imm == (char)Imm; }]>;
+let FastIselShouldIgnore = 1 in { // FastIsel should ignore all simm8 instrs.
+ def i16immSExt8 : ImmLeaf<i16, [{ return Imm == (char)Imm; }]>;
+ def i32immSExt8 : ImmLeaf<i32, [{ return Imm == (char)Imm; }]>;
+ def i64immSExt8 : ImmLeaf<i64, [{ return Imm == (char)Imm; }]>;
+}
+
def i64immSExt32 : ImmLeaf<i64, [{ return Imm == (int32_t)Imm; }]>;
OpenPOWER on IntegriCloud