[PATCH] D30833: [X86][MMX] Fix folding of shift value loads to cover whole 64-bits

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 10 08:48:07 PST 2017


RKSimon created this revision.

https://reviews.llvm.org/rL230225 made the assumption that only the lower 32-bits of an MMX register load is used as a shift value, when in fact the whole 64-bits are reloaded and treated as a i64 to determine the shift value.

This patch reverts https://reviews.llvm.org/rL230225 to ensure that the whole 64-bits of memory are folded and ensures that the upper 32-bit are zero'd for cases where the shift value has come from a scalar source.

Found during fuzz testing.


Repository:
  rL LLVM

https://reviews.llvm.org/D30833

Files:
  lib/Target/X86/X86InstrFragmentsSIMD.td
  lib/Target/X86/X86InstrMMX.td
  test/CodeGen/X86/bitcast-mmx.ll
  test/CodeGen/X86/mmx-fold-load.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30833.91357.patch
Type: text/x-patch
Size: 11287 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170310/8df38c2b/attachment.bin>


More information about the llvm-commits mailing list