LLVM backend for 6502
Go to file
Ahmed Bougacha 0f32a037ef [MemCpyOpt] Use the raw i8* dest when optimizing memset+memcpy.
MemIntrinsic::getDest() looks through pointer casts, and using it
directly when building the new GEP+memset results in stuff like:

  %0 = getelementptr i64* %p, i32 16
  %1 = bitcast i64* %0 to i8*
  call ..memset(i8* %1, ...)

instead of the correct:

  %0 = bitcast i64* %p to i8*
  %1 = getelementptr i8* %0, i32 16
  call ..memset(i8* %1, ...)

Instead, use getRawDest, which just gives you the i8* value.
While there, use the memcpy's dest, as it's live anyway.

In most cases, when the optimization triggers, the memset and memcpy
sizes are the same, so the built memset is 0-sized and eliminated.
The problem occurs when they're different.

Fixes a regression caused by r235232: PR23300.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235419 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-21 21:28:33 +00:00
autoconf Try to unbreak Clang build to export LLVM_ABI_BREAKING_CHECKS, fixup for r233310. 2015-04-01 11:46:15 +00:00
bindings DebugInfo: Remove DIArray and DITypeArray typedefs 2015-04-21 20:07:38 +00:00
cmake Add targets to cmake for specific target components. 2015-04-20 18:22:05 +00:00
docs Minor edits to the llvm-cov documentation. 2015-04-21 16:32:02 +00:00
examples DebugInfo: Fix Kaleidoscope Ch. 8 after r235327 2015-04-20 21:29:44 +00:00
include Update comment. NFC. 2015-04-21 21:15:35 +00:00
lib [MemCpyOpt] Use the raw i8* dest when optimizing memset+memcpy. 2015-04-21 21:28:33 +00:00
projects Reverse the order libc++ and libc++abi are added in CMake. 2015-03-04 01:16:43 +00:00
test [MemCpyOpt] Use the raw i8* dest when optimizing memset+memcpy. 2015-04-21 21:28:33 +00:00
tools DebugInfo: Drop rest of DIDescriptor subclasses 2015-04-21 18:44:06 +00:00
unittests DebugInfo: Remove DIArray and DITypeArray typedefs 2015-04-21 20:07:38 +00:00
utils AVX-512: Added VPMOVx2M instructions for SKX, 2015-04-21 14:38:31 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore Ignore compile_commands.json only at the root of the tree. 2015-03-26 18:55:42 +00:00
CMakeLists.txt [CMake] Updates to llvm-shlib to support overriding exports list and added an option to export all symbols. 2015-04-13 21:29:46 +00:00
CODE_OWNERS.TXT Add myself as the Constant Folder owner. 2015-04-20 23:19:10 +00:00
configure Try to unbreak Clang build to export LLVM_ABI_BREAKING_CHECKS, fixup for r233310. 2015-04-01 11:46:15 +00:00
CREDITS.TXT
LICENSE.TXT Update for a new year. 2015-03-12 01:25:29 +00:00
llvm.spec.in
LLVMBuild.txt
Makefile
Makefile.common
Makefile.config.in Try to unbreak Clang build to export LLVM_ABI_BREAKING_CHECKS, fixup for r233310. 2015-04-01 11:46:15 +00:00
Makefile.rules
README.txt Revert test commit at revision 233535. 2015-03-30 12:39:03 +00:00

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.