llvm-6502/test
Derek Schuff c22cdb7203 Fix miscompile due to StackColoring incorrectly merging stack slots (PR15707)
IR optimisation passes can result in a basic block that contains:

  llvm.lifetime.start(%buf)
  ...
  llvm.lifetime.end(%buf)
  ...
  llvm.lifetime.start(%buf)

Before this change, calculateLiveIntervals() was ignoring the second
lifetime.start() and was regarding %buf as being dead from the
lifetime.end() through to the end of the basic block.  This can cause
StackColoring to incorrectly merge %buf with another stack slot.

Fix by removing the incorrect Starts[pos].isValid() and
Finishes[pos].isValid() checks.

Just doing:
      Starts[pos] = Indexes->getMBBStartIdx(MBB);
      Finishes[pos] = Indexes->getMBBEndIdx(MBB);
unconditionally would be enough to fix the bug, but it causes some
test failures due to stack slots not being merged when they were
before.  So, in order to keep the existing tests passing, treat LiveIn
and LiveOut separately rather than approximating the live ranges by
merging LiveIn and LiveOut.

This fixes PR15707.
Patch by Mark Seaborn.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181922 91177308-0d34-0410-b5e6-96231b3b80d8
2013-05-15 21:15:09 +00:00
..
Analysis
Archive
Assembler
Bindings/Ocaml
Bitcode
BugPoint
CodeGen Fix miscompile due to StackColoring incorrectly merging stack slots (PR15707) 2013-05-15 21:15:09 +00:00
DebugInfo
ExecutionEngine
Feature
FileCheck Add 'CHECK-DAG' support 2013-05-14 20:34:12 +00:00
Instrumentation
Integer
JitListener
Linker
MC [PowerPC] Remove need for adjustFixupOffst hack 2013-05-15 15:07:06 +00:00
Object Object: Fix Mach-O relocation printing. 2013-05-14 22:41:29 +00:00
Other
TableGen
tools
Transforms LoopVectorize: Hoist conditional loads if possible 2013-05-15 01:44:30 +00:00
Unit
Verifier
YAMLParser
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh