summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2007-09-17 14:55:08 +0000
committerDan Gohman <gohman@apple.com>2007-09-17 14:55:08 +0000
commit96aee15d33483c753e4e4c613a79a244d5535d7c (patch)
tree647c4fa4a70df121eadec7fe07099ecb68e068e0 /llvm/lib
parent863bdc332df2083e38d7d5c816892d45746ffeb4 (diff)
downloadbcm5719-llvm-96aee15d33483c753e4e4c613a79a244d5535d7c.tar.gz
bcm5719-llvm-96aee15d33483c753e4e4c613a79a244d5535d7c.zip
Use xorl instead of xorq to enter a zero into a 64-bit register.
llvm-svn: 42027
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86InstrX86-64.td6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/X86/X86InstrX86-64.td b/llvm/lib/Target/X86/X86InstrX86-64.td
index 89d952a5b05..5b356084ffb 100644
--- a/llvm/lib/Target/X86/X86InstrX86-64.td
+++ b/llvm/lib/Target/X86/X86InstrX86-64.td
@@ -1018,13 +1018,15 @@ def PsMOVZX64rm32: I<0x8B, MRMSrcMem, (outs GR64:$dst), (ins i32mem:$src),
[(set GR64:$dst, (zextloadi64i32 addr:$src))]>;
-// Alias instructions that map movr0 to xor.
+// Alias instructions that map movr0 to xor. Use xorl instead of xorq; it's
+// equivalent due to implicit zero-extending, and it sometimes has a smaller
+// encoding.
// FIXME: remove when we can teach regalloc that xor reg, reg is ok.
// FIXME: AddedComplexity gives MOV64r0 a higher priority than MOV64ri32. Remove
// when we have a better way to specify isel priority.
let Defs = [EFLAGS], AddedComplexity = 1, isReMaterializable = 1 in
def MOV64r0 : RI<0x31, MRMInitReg, (outs GR64:$dst), (ins),
- "xor{q}\t$dst, $dst",
+ "xor{l}\t${dst:subreg32}, ${dst:subreg32}",
[(set GR64:$dst, 0)]>;
// Materialize i64 constant where top 32-bits are zero.
OpenPOWER on IntegriCloud