[RegAllocGreedy] Fix crash in tryLocalSplit
authorWalter Lee <waltl@google.com>
Thu, 20 Sep 2018 20:05:57 +0000 (20:05 +0000)
committerWalter Lee <waltl@google.com>
Thu, 20 Sep 2018 20:05:57 +0000 (20:05 +0000)
commitf75e8036790bae267265b4b1f05416860bfb0a55
tree886b69edd0b5012d4f7908bd1ea59ef6ccfc2b6f
parent4e0295bed380bd666b5c26491fa6d069703742c9
[RegAllocGreedy] Fix crash in tryLocalSplit

tryLocalSplit only handles a single use block, but an interval may
have multiple use blocks.  So don't crash in that case.  This fixes
PR38795.

Differential revision: https://reviews.llvm.org/D52277

llvm-svn: 342682
llvm/lib/CodeGen/RegAllocGreedy.cpp
llvm/test/CodeGen/X86/pr38795.ll [new file with mode: 0644]