MemCpyOpt: Turn memcpys from a constant into a memset if possible.

This allows us to compile "int cst[] = {-1, -1, -1};" into
  movl  $-1, 16(%rsp)
  movq  $-1, 8(%rsp)
instead of
  movl  _cst+8(%rip), %eax
  movl  %eax, 16(%rsp)
  movq  _cst(%rip), %rax
  movq  %rax, 8(%rsp)

llvm-svn: 122548
2 files changed
tree: ae93952ff4dd0f241cdcfbea39a10547f17f6fba
  1. clang/
  2. compiler-rt/
  3. debuginfo-tests/
  4. libcxx/
  5. lldb/
  6. llvm/