1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-24 05:23:45 +02:00
llvm-mirror/test
Ahmed Bougacha 63ac678e11 [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.

llvm-svn: 227250
2015-01-27 21:52:16 +00:00
..
Analysis Fix incorrect partial aliasing 2015-01-26 17:31:17 +00:00
Assembler IR: Update references to temporaries before deleting 2015-01-22 21:36:45 +00:00
Bindings
Bitcode [Bitcode] Diagnose errors instead of asserting from bad input 2015-01-24 04:15:05 +00:00
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 Remove a few more redundant ExecutionEngine regression tests. 2015-01-24 22:41:13 +00:00
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 [ELFYAML] Support mips64 relocation record format in yaml2obj/obj2yaml 2015-01-25 13:29:25 +00:00
Other If we see UTF-8 BOM sequence at the beginning of a response file, we shall 2015-01-24 04:23:08 +00:00
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 Reverting r226937: lit: Make MCJIT's supported arch check case insensitive 2015-01-24 01:42:44 +00:00
Makefile
Makefile.tests
TestRunner.sh