summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-11-06 07:14:44 +0000
committerChris Lattner <sabre@nondot.org>2010-11-06 07:14:44 +0000
commitfecdad623755b657535fbb64b9af9fd9880bdf28 (patch)
treec2359ba046a598ba6541f80aee918d1ad1fced83 /llvm/lib
parentb625dd2d8725234496fa1b1a785f6f9ec98ed58c (diff)
downloadbcm5719-llvm-fecdad623755b657535fbb64b9af9fd9880bdf28.tar.gz
bcm5719-llvm-fecdad623755b657535fbb64b9af9fd9880bdf28.zip
Reimplement BuildResultOperands to be in terms of the result instruction's
operand list instead of the operand list redundantly declared on the alias or instruction. With this change, we finally remove the ins/outs list on the alias. Before: def : InstAlias<(outs GR16:$dst), (ins GR8 :$src), "movsx $src, $dst", (MOVSX16rr8W GR16:$dst, GR8:$src)>; After: def : InstAlias<"movsx $src, $dst", (MOVSX16rr8W GR16:$dst, GR8:$src)>; This also makes the alias mechanism more general and powerful, which will be exploited in subsequent patches. llvm-svn: 118329
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86InstrInfo.td39
1 files changed, 13 insertions, 26 deletions
diff --git a/llvm/lib/Target/X86/X86InstrInfo.td b/llvm/lib/Target/X86/X86InstrInfo.td
index 9908ade8c15..ad3fe1556be 100644
--- a/llvm/lib/Target/X86/X86InstrInfo.td
+++ b/llvm/lib/Target/X86/X86InstrInfo.td
@@ -1371,50 +1371,37 @@ defm : IntegerCondCodeMnemonicAlias<"cmov", "q">;
//===----------------------------------------------------------------------===//
// movsx aliases
-def : InstAlias<(outs GR16:$dst), (ins GR8 :$src),
- "movsx $src, $dst",
+def : InstAlias<"movsx $src, $dst",
(MOVSX16rr8W GR16:$dst, GR8:$src)>;
-def : InstAlias<(outs GR16:$dst), (ins i8mem:$src),
- "movsx $src, $dst",
+def : InstAlias<"movsx $src, $dst",
(MOVSX16rm8W GR16:$dst, i8mem:$src)>;
-def : InstAlias<(outs GR32:$dst), (ins GR8 :$src),
- "movsx $src, $dst",
+def : InstAlias<"movsx $src, $dst",
(MOVSX32rr8 GR32:$dst, GR8:$src)>;
-def : InstAlias<(outs GR32:$dst), (ins GR16:$src),
- "movsx $src, $dst",
+def : InstAlias<"movsx $src, $dst",
(MOVSX32rr16 GR32:$dst, GR16:$src)>;
-def : InstAlias<(outs GR64:$dst), (ins GR8 :$src),
- "movsx $src, $dst",
+def : InstAlias<"movsx $src, $dst",
(MOVSX64rr8 GR64:$dst, GR8:$src)>;
-def : InstAlias<(outs GR64:$dst), (ins GR16:$src),
- "movsx $src, $dst",
+def : InstAlias<"movsx $src, $dst",
(MOVSX64rr16 GR64:$dst, GR16:$src)>;
-def : InstAlias<(outs GR64:$dst), (ins GR32:$src),
- "movsx $src, $dst",
+def : InstAlias<"movsx $src, $dst",
(MOVSX64rr32 GR64:$dst, GR32:$src)>;
// movzx aliases
-def : InstAlias<(outs GR16:$dst), (ins GR8 :$src),
- "movzx $src, $dst",
+def : InstAlias<"movzx $src, $dst",
(MOVZX16rr8W GR16:$dst, GR8:$src)>;
-def : InstAlias<(outs GR16:$dst), (ins i8mem:$src),
- "movzx $src, $dst",
+def : InstAlias<"movzx $src, $dst",
(MOVZX16rm8W GR16:$dst, i8mem:$src)>;
-def : InstAlias<(outs GR32:$dst), (ins GR8 :$src),
- "movzx $src, $dst",
+def : InstAlias<"movzx $src, $dst",
(MOVZX32rr8 GR32:$dst, GR8:$src)>;
-def : InstAlias<(outs GR32:$dst), (ins GR16:$src),
- "movzx $src, $dst",
+def : InstAlias<"movzx $src, $dst",
(MOVZX32rr16 GR32:$dst, GR16:$src)>;
-def : InstAlias<(outs GR64:$dst), (ins GR8 :$src),
- "movzx $src, $dst",
+def : InstAlias<"movzx $src, $dst",
(MOVZX64rr8_Q GR64:$dst, GR8:$src)>;
-def : InstAlias<(outs GR64:$dst), (ins GR16:$src),
- "movzx $src, $dst",
+def : InstAlias<"movzx $src, $dst",
(MOVZX64rr16_Q GR64:$dst, GR16:$src)>;
// Note: No GR32->GR64 movzx form.
OpenPOWER on IntegriCloud