[X86][MMX] Prevent MMX_MOVD64rm folding
authorBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Wed, 25 Feb 2015 15:13:52 +0000 (15:13 +0000)
committerBruno Cardoso Lopes <bruno.cardoso@gmail.com>
Wed, 25 Feb 2015 15:13:52 +0000 (15:13 +0000)
commit8ad268fd61ca568ee9b9e286a5af82053b4eddea
tree9376c67a10973d47752ba3ac595b2c3f0cc2e33d
parentb451f4e37699b91e33a0a0db66172d2e1ac373f4
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230498 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86InstrMMX.td