llvm-6502/test
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
..
Analysis Recognize n/1 in the SCEV divide function 2015-04-20 16:03:28 +00:00
Assembler [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
Bindings DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
Bitcode [opaque pointer type] Explicit pointee type for call instruction 2015-04-17 06:40:14 +00:00
BugPoint bugpoint Enhancement. 2015-04-20 23:42:22 +00:00
CodeGen [Hexagon] Patterns for frame index with offset for isel 2015-04-21 21:28:03 +00:00
DebugInfo DebugInfo: Fixup r235149 after IR change in r235145 2015-04-17 00:37:53 +00:00
ExecutionEngine [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
Feature [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
FileCheck
Instrumentation [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
Integer [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
JitListener DebugInfo: Move new hierarchy into place 2015-03-03 17:24:31 +00:00
Linker [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
LTO [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
MC AVX-512: Added VPMOVx2M instructions for SKX, 2015-04-21 14:38:31 +00:00
Object [opaque pointer type] Add textual IR support for explicit type parameter to gep operator 2015-03-13 18:20:45 +00:00
Other [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
SymbolRewriter
TableGen Add support for v1i128 type. 2015-04-17 16:11:05 +00:00
tools [Mips] Support DT_MIPS_OPTIONS dynamic section tag in the llvm-readobj 2015-04-20 05:34:48 +00:00
Transforms [MemCpyOpt] Use the raw i8* dest when optimizing memset+memcpy. 2015-04-21 21:28:33 +00:00
Unit
Verifier [opaque pointer type] Add textual IR support for explicit type parameter to the call instruction 2015-04-16 23:24:18 +00:00
YAMLParser
.clang-format
CMakeLists.txt test: Fix the dependencies for the check-llvm-* targets 2015-03-25 08:07:47 +00:00
lit.cfg Tell lit.cfg about more Windows triples. 2015-03-20 22:08:40 +00:00
lit.site.cfg.in test: Make a start on a test suite for libLTO. 2015-03-19 23:55:38 +00:00
Makefile test: Make a start on a test suite for libLTO. 2015-03-19 23:55:38 +00:00
Makefile.tests
TestRunner.sh