1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/test
Chandler Carruth 146e90b6dd Revert the business end of r164636 and try again. I'll come in again. ;]
This should really, really fix PR13916. For real this time. The
underlying bug is... a bit more subtle than I had imagined.

The setup is a code pattern that leads to an @llvm.memcpy call with two
equal pointers to an alloca in the source and dest. Now, not any pattern
will do. The alloca needs to be formed just so, and both pointers should
be wrapped in different bitcasts etc. When this precise pattern hits,
a funny sequence of events transpires. First, we correctly detect the
potential for overlap, and correctly optimize the memcpy. The first
time. However, we do simplify the set of users of the alloca, and that
causes us to run the alloca back through the SROA pass in case there are
knock-on simplifications. At this point, a curious thing has happened.
If we happen to have an i8 alloca, we have direct i8 pointer values. So
we don't bother creating a cast, we rewrite the arguments to the memcpy
to dircetly refer to the alloca.

Now, in an unrelated area of the pass, we have clever logic which
ensures that when visiting each User of a particular pointer derived
from an alloca, we only visit that User once, and directly inspect all
of its operands which refer to that particular pointer value. However,
the mechanism used to detect memcpy's with the potential to overlap
relied upon getting visited once per *Use*, not once per *User*. This is
always true *unless* the same exact value is both source and dest. It
turns out that almost nothing actually produces that pattern though.

We can hand craft test cases that more directly test this behavior of
course, and those are included. Also, note that there is a significant
missed optimization here -- we prove in many cases that there is
a non-volatile memcpy call with identical source and dest addresses. We
shouldn't prevent splitting the alloca in that case, and in fact we
should just remove such memcpy calls eagerly. I'll address that in
a subsequent commit.

llvm-svn: 164669
2012-09-26 07:41:40 +00:00
..
Analysis BasicAA: Recognize cyclic NoAlias phis 2012-09-06 14:41:53 +00:00
Archive
Assembler The normal edge of an invoke is not allowed to branch to a block with a 2012-08-10 20:55:20 +00:00
Bindings/Ocaml fix test's RUN lines 2012-09-02 15:07:25 +00:00
Bitcode BitcodeReader: Correctly insert blockaddress constant referring to a already parsed function. 2012-09-21 14:34:31 +00:00
BugPoint
CodeGen Generate an error message instead of asserting or segfaulting when we have a 2012-09-26 06:16:18 +00:00
DebugInfo Only emit DW_AT_object_pointer if this is a definition. 2012-09-20 22:51:57 +00:00
ExecutionEngine Revert "Enable MCJIT tests on Darwin." 2012-09-06 03:24:09 +00:00
Feature Change the linker_private_weak_def_auto' linkage to linkonce_odr_auto_hide' to 2012-08-17 18:33:14 +00:00
Instrumentation [asan] add code to detect global initialization fiasco in C/C++. The sub-pass is off by default for now. Patch by Reid Watson. Note: this patch changes the interface between LLVM and compiler-rt parts of asan. The corresponding patch to compiler-rt will follow. 2012-08-21 08:24:25 +00:00
Integer Convert all tests using TCL-style quoting to use shell-style quoting. 2012-07-02 12:47:22 +00:00
Linker Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
MC ARM: Darwin BL/BLX relocations to out-of-range symbols. 2012-09-25 18:07:17 +00:00
Object Fix SymbolRef::getAddress implementation for ELF. The 'value' field in symbol table entry should be treated differently for relocatable and relocated files. This patch fixes symbol addresses printed by llvm-nm for executables and shared objects. 2012-09-21 07:08:08 +00:00
Other Change the way the lint sanity checking pass detects misaligned memory accesses. 2012-09-25 10:00:49 +00:00
Scripts This allows hello world to be compiled for Mips 64 direct object. 2012-06-27 22:48:25 +00:00
TableGen Re-work bit/bits value resolving in tblgen 2012-09-06 23:32:48 +00:00
Transforms Revert the business end of r164636 and try again. I'll come in again. ;] 2012-09-26 07:41:40 +00:00
Unit tests: Rip out a bunch of now unused test code relating to use of llvm-gcc in LLVM tests. 2011-10-27 20:59:26 +00:00
Verifier Assert that dominates is not given a multiple edge. Finding out if we have 2012-08-17 18:21:28 +00:00
YAMLParser Convert the uses of '|&' to use '2>&1 |' instead, which works on old 2012-07-02 18:37:59 +00:00
CMakeLists.txt llvm/test: [CMake] Add profile_rt-shared to deps. 2012-08-29 00:37:56 +00:00
lit.cfg llvm/test/lit.cfg: Retweak for Win32 to fix testing. 2012-07-03 03:59:34 +00:00
lit.site.cfg.in Remove 'site.exp' building from both CMake and configure+make. 2012-06-28 00:16:51 +00:00
Makefile yet another attempt at fixing @OCAMLOPT@ for sed. 2012-09-07 09:24:13 +00:00
Makefile.tests
TestRunner.sh