llvm-6502/test
Chandler Carruth e1a5243053 Fix a really nasty SROA bug with how we handled out-of-bounds memcpy
intrinsics.

Reported on the list by Evan with a couple of attempts to fix, but it
took a while to dig down to the root cause. There are two overlapping
bugs here, both centering around the circumstance of discovering
a memcpy operand which is known to be completely outside the bounds of
the alloca.

First, we need to kill the *other* side of the memcpy if it was added to
this alloca. Otherwise we'll factor it into our slicing and try to
rewrite it even though we know for a fact that it is dead. This is made
more tricky because we can visit the sides in either order. So we have
to both kill the other side and skip instructions marked as dead. The
latter really should be goodness in every case, but here is a matter of
correctness.

Second, we need to actually remove the *uses* of the alloca by the
memcpy when queuing it for later deletion. Otherwise it may still be
using the alloca when we go to promote it (if the rewrite re-uses the
existing alloca instruction). Do this by factoring out the
use-clobbering used when for nixing a Phi argument and re-using it
across the operands of a to-be-deleted instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199590 91177308-0d34-0410-b5e6-96231b3b80d8
2014-01-19 12:16:54 +00:00
..
Analysis BasicAA: We need to check both access sizes when comparing a gep and an 2014-01-16 04:53:18 +00:00
Assembler Add an inalloca flag to allocas 2014-01-17 23:58:17 +00:00
Bindings
Bitcode Report a warning when dropping outdated debug info metadata. 2014-01-16 01:51:12 +00:00
BugPoint
CodeGen ARM: update build attributes for ABI r2.09 2014-01-19 08:25:35 +00:00
DebugInfo llvm-symbolizer: make mangled name heuristic apply to all symbols 2014-01-16 17:25:12 +00:00
ExecutionEngine Revert 199262 - MCJIT remote still failing on ARM 2014-01-15 09:09:46 +00:00
Feature
FileCheck
Instrumentation [asan] extend asan-coverage (still experimental). 2014-01-17 11:00:30 +00:00
Integer
JitListener
Linker Debug info (LTO): Move the creation of accessibility flags to 2014-01-18 02:12:00 +00:00
LTO
MC ARM ELF: ensure that the tag types are corrected 2014-01-19 08:25:41 +00:00
Object Fix typo: : not ; 2014-01-16 07:08:22 +00:00
Other
TableGen
tools llvm-objdump/COFF: Print ordinal base number. 2014-01-17 22:02:24 +00:00
Transforms Fix a really nasty SROA bug with how we handled out-of-bounds memcpy 2014-01-19 12:16:54 +00:00
Unit
Verifier [PM] Make the verifier work independently of any pass manager. 2014-01-19 02:22:18 +00:00
YAMLParser
.clang-format
CMakeLists.txt [CMake] Add llvm-tblgen to dependencies of check-llvm. 2014-01-18 19:01:08 +00:00
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh