X86: remove atomic instructions *after* we've iterated through them.
authorTim Northover <tnorthover@apple.com>
Tue, 1 Jul 2014 22:10:30 +0000 (22:10 +0000)
committerTim Northover <tnorthover@apple.com>
Tue, 1 Jul 2014 22:10:30 +0000 (22:10 +0000)
commit115f3667ceb747548dd1b5410b820c7382d6b185
treeb0e70d5fcaf98239674469cbb37dcdeee7f1eaa3
parent75909261f05aa06bdabf9b37e3172be7be7b40c1
X86: remove atomic instructions *after* we've iterated through them.

Otherwise they get freed and the implicit "isa<XYZ>" tests following
turn out badly (at least under sanitizers).

Also corrects the ordering of unordered atomic stores.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212136 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86AtomicExpandPass.cpp