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)
commit334d8eebe5ef1e24764967d737a24945c980ac2c
tree08adfc5134b928bdc03b93e37873ac2afdf74915
parent3bd03c709930114405fca1eaaae1eef8b2be2d58
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.

llvm-svn: 212136
llvm/lib/Target/X86/X86AtomicExpandPass.cpp