XCore target: fix bug in XCoreLowerThreadLocal.cpp
authorRobert Lytton <robert@xmos.com>
Fri, 11 Oct 2013 10:26:48 +0000 (10:26 +0000)
committerRobert Lytton <robert@xmos.com>
Fri, 11 Oct 2013 10:26:48 +0000 (10:26 +0000)
commitfb312f9f5a9f8cd8be1dbeaf011768e186eb8f98
treef3838961471bd5139a5220a3e126dcdcfc5bae53
parent7b5376659c1c822960a5cb56d5e1417cfd74673f
XCore target: fix bug in XCoreLowerThreadLocal.cpp

When a ConstantExpr which uses a thread local is part of a PHI node
instruction, the insruction that replaces the ConstantExpr must
be inserted in the predecessor block, in front of the terminator instruction.
If the predecessor block has multiple successors, the edge is first split.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192432 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/XCore/XCoreLowerThreadLocal.cpp
test/CodeGen/XCore/threads.ll