diff options
author | Juergen Ributzka <juergen@apple.com> | 2014-07-16 22:20:51 +0000 |
---|---|---|
committer | Juergen Ributzka <juergen@apple.com> | 2014-07-16 22:20:51 +0000 |
commit | 618ce3e85ed1c68e89dc696b7c9ab94a6a910797 (patch) | |
tree | 58f42ec500e16de329bfa7518eb4a822a247a6f7 /llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | |
parent | 8b205306892ea701978a2b789f6eafe4277648a7 (diff) | |
download | bcm5719-llvm-618ce3e85ed1c68e89dc696b7c9ab94a6a910797.tar.gz bcm5719-llvm-618ce3e85ed1c68e89dc696b7c9ab94a6a910797.zip |
[FastISel] Local values shouldn't be alive across an inline asm call with side effects.
This fixes an issue where a local value is defined before and used after an
inline asm call with side effects.
This fix simply flushes the local value map, which updates the insertion point
for the inline asm call to be above any previously defined local values.
This fixes <rdar://problem/17694203>
llvm-svn: 213203
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/FastISel.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp index f071efa7b55..ad75e916cef 100644 --- a/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp @@ -1038,6 +1038,11 @@ bool FastISel::SelectCall(const User *I) { // Handle simple inline asms. if (const InlineAsm *IA = dyn_cast<InlineAsm>(Call->getCalledValue())) { + // If the inline asm has side effects, then make sure that no local value + // lives across by flushing the local value map. + if (IA->hasSideEffects()) + flushLocalValueMap(); + // Don't attempt to handle constraints. if (!IA->getConstraintString().empty()) return false; |