llvm-6502/test
Ahmed Bougacha 37be0d7c43 [SimplifyLibCalls] Don't confuse strcpy_chk for stpcpy_chk.
This was introduced in a faulty refactoring (r225640, mea culpa):
the tests weren't testing the return values, so, for both
__strcpy_chk and __stpcpy_chk, we would return the end of the
buffer (matching stpcpy) instead of the beginning (for strcpy).

The root cause was the prefix "__" being ignored when comparing,
which made us always pick LibFunc::stpcpy_chk.
Pass the LibFunc::Func directly to avoid this kind of error.
Also, make the testcases as explicit as possible to prevent this.

The now-useful testcases expose another, entangled, stpcpy problem,
with the further simplification.  This was introduced in a
refactoring (r225640) to match the original behavior.

However, this leads to problems when successive simplifications
generate several similar instructions, none of which are removed
by the custom replaceAllUsesWith.

For instance, InstCombine (the main user) doesn't erase the
instruction in its custom RAUW.  When trying to simplify say
__stpcpy_chk:
- first, an stpcpy is created (fortified simplifier),
- second, a memcpy is created (normal simplifier), but the
  stpcpy call isn't removed.
- third, InstCombine later revisits the instructions,
  and simplifies the first stpcpy to a memcpy.  We now have
  two memcpys.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227250 91177308-0d34-0410-b5e6-96231b3b80d8
2015-01-27 21:52:16 +00:00
..
Analysis
Assembler
Bindings
Bitcode
BugPoint
CodeGen Revert "[x86] Combine x86mmx/i64 to v2i64 conversion to use scalar_to_vector" 2015-01-27 21:34:11 +00:00
DebugInfo Replace this testcase with an even shorter one provided by dblaikie. 2015-01-27 00:22:17 +00:00
ExecutionEngine
Feature
FileCheck
Instrumentation tsan: properly instrument unaligned accesses 2015-01-27 20:19:17 +00:00
Integer
JitListener
Linker
LTO
MC [mips] Add range checks and transformation to octeon instructions in AsmParser. 2015-01-27 19:11:28 +00:00
Object
Other
SymbolRewriter
TableGen
tools dd the option, -link-opt-hints to llvm-objdump used with -macho to print the 2015-01-27 21:28:24 +00:00
Transforms [SimplifyLibCalls] Don't confuse strcpy_chk for stpcpy_chk. 2015-01-27 21:52:16 +00:00
Unit
Verifier
YAMLParser
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh