summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>2015-02-25 15:13:52 +0000
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>2015-02-25 15:13:52 +0000
commit48b10681f9e549f5b95d2d65d617c2c9b5d040de (patch)
tree9ab3b29e54e001c43f1e09a346c907747b8dc3f6 /llvm/lib
parent4c0e4a12bd1ba0ce8af7f02dbd2dbb78af31a000 (diff)
downloadbcm5719-llvm-48b10681f9e549f5b95d2d65d617c2c9b5d040de.tar.gz
bcm5719-llvm-48b10681f9e549f5b95d2d65d617c2c9b5d040de.zip
[X86][MMX] Prevent MMX_MOVD64rm folding
MMX_MOVD64rm zero-extends i32 load results into i64 registers. The peephole optimizer will try to fold it in other MMX foldable instructions, the wrong thing to do, since there's no MMX memory instruction that loads from i32 and does implict zero extension. Remove 'canFoldAsLoad' from MOVD64rm in order to prevent such folding. The current MMX tests already test this, but since there are no MMX instructions in the foldable tables yet, this did not trigger. This commit prepares the addition of those instructions. llvm-svn: 230498
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86InstrMMX.td1
1 files changed, 0 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86InstrMMX.td b/llvm/lib/Target/X86/X86InstrMMX.td
index ed2822de341..eaa7894004c 100644
--- a/llvm/lib/Target/X86/X86InstrMMX.td
+++ b/llvm/lib/Target/X86/X86InstrMMX.td
@@ -223,7 +223,6 @@ def MMX_MOVD64rr : MMXI<0x6E, MRMSrcReg, (outs VR64:$dst), (ins GR32:$src),
[(set VR64:$dst,
(x86mmx (scalar_to_vector GR32:$src)))],
IIC_MMX_MOV_MM_RM>, Sched<[WriteMove]>;
-let canFoldAsLoad = 1 in
def MMX_MOVD64rm : MMXI<0x6E, MRMSrcMem, (outs VR64:$dst), (ins i32mem:$src),
"movd\t{$src, $dst|$dst, $src}",
[(set VR64:$dst,
OpenPOWER on IntegriCloud