summaryrefslogtreecommitdiffstats
path: root/compiler-rt/SDKs/darwin/usr/include/string.h
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@google.com>2013-05-15 21:15:09 +0000
committerDerek Schuff <dschuff@google.com>2013-05-15 21:15:09 +0000
commitd2c42d766d9b054304c910bf4f45f7d382425739 (patch)
treea6af8fd27a2d5a6033a5fcde2882491481eb4b3d /compiler-rt/SDKs/darwin/usr/include/string.h
parent863bd4a534a28176a7931f70d6ad259bfeb0aea0 (diff)
downloadbcm5719-llvm-d2c42d766d9b054304c910bf4f45f7d382425739.tar.gz
bcm5719-llvm-d2c42d766d9b054304c910bf4f45f7d382425739.zip
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. llvm-svn: 181922
Diffstat (limited to 'compiler-rt/SDKs/darwin/usr/include/string.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud