llvm-6502/test
Michael Gottesman acfb3584c5 [objc-arc-opts] In the presense of an alloca unconditionally remove RR pairs if and only if we are both KnownSafeBU/KnownSafeTD rather than just either or.
In the presense of a block being initialized, the frontend will emit the
objc_retain on the original pointer and the release on the pointer loaded from
the alloca. The optimizer will through the provenance analysis realize that the
two are related (albiet different), but since we only require KnownSafe in one
direction, will match the inner retain on the original pointer with the guard
release on the original pointer. This is fixed by ensuring that in the presense
of allocas we only unconditionally remove pointers if both our retain and our
release are KnownSafe (i.e. we are KnownSafe in both directions) since we must
deal with the possibility that the frontend will emit what (to the optimizer)
appears to be unbalanced retain/releases.

An example of the miscompile is:

  %A = alloca
  retain(%x)
  retain(%x) <--- Inner Retain
  store %x, %A
  %y = load %A
  ... DO STUFF ...
  release(%y)
  call void @use(%x)
  release(%x) <--- Guarding Release

getting optimized to:

  %A = alloca
  retain(%x)
  store %x, %A
  %y = load %A
  ... DO STUFF ...
  release(%y)
  call void @use(%x)

rdar://13750319

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181743 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-13 23:49:42 +00:00
..
Analysis AArch64: use MCJIT by default and enable related tests. 2013-05-06 16:51:08 +00:00
Archive
Assembler Correct invalid debug info metadata 2013-03-12 19:04:24 +00:00
Bindings/Ocaml Use the attribute group reference instead of the attribute directly. 2013-02-20 07:48:23 +00:00
Bitcode Unify clang/llvm attributes for asan/tsan/msan (LLVM part) 2013-02-26 06:58:09 +00:00
BugPoint
CodeGen PPC64: Constant initializers with dynamic relocations go in .data.rel.ro. 2013-05-13 19:34:37 +00:00
DebugInfo Give the test from r181632 a target triple. 2013-05-10 22:14:39 +00:00
ExecutionEngine XFAIL this test for mingw too. 2013-05-13 00:18:24 +00:00
Feature Clarify that llvm.used can contain aliases. 2013-04-22 14:58:02 +00:00
FileCheck Remove SMLoc paired with CHECK-NOT patterns. Not functionality change. 2013-04-25 21:31:34 +00:00
Instrumentation Add missing colons to check lines. 2013-04-11 12:41:41 +00:00
Integer Rewrite test/Integer tests to use FileCheck instead of grep 2013-04-08 20:18:15 +00:00
JitListener
Linker Rewrite test/Linker tests to use FileCheck instead of grep. 2013-04-09 16:51:13 +00:00
MC Mips assembler: Assembler macro ADDIU $rs,imm 2013-05-13 20:26:46 +00:00
Object Change getRelocationAdditionalInfo to be ELF only. 2013-05-09 03:39:05 +00:00
Other Attributes: Don't print trailing whitespace on the function attribute comment. 2013-04-19 11:43:21 +00:00
TableGen Allow TableGen DAG arguments to be just a name. 2013-03-24 19:36:51 +00:00
tools Use pointers to iterate over symbols. 2013-04-24 19:47:55 +00:00
Transforms [objc-arc-opts] In the presense of an alloca unconditionally remove RR pairs if and only if we are both KnownSafeBU/KnownSafeTD rather than just either or. 2013-05-13 23:49:42 +00:00
Unit Propagate path to ASan/MSan symbolizer into test environment to produce useful reports on errors. 2013-04-04 07:41:00 +00:00
Verifier Also verify llvm.compiler_used. 2013-04-22 15:16:51 +00:00
YAMLParser
CMakeLists.txt Add obj2yaml to test dependencies 2013-04-05 07:26:37 +00:00
lit.cfg AArch64: use MCJIT by default and enable related tests. 2013-05-06 16:51:08 +00:00
lit.site.cfg.in Allow host triple to be correctly overridden in CMake builds 2013-05-04 07:36:23 +00:00
Makefile Allow host triple to be correctly overridden in CMake builds 2013-05-04 07:36:23 +00:00
Makefile.tests Remove obsolete object file dumpers 2013-04-12 04:07:13 +00:00
TestRunner.sh