steven_wu added a comment. Thanks for cleaning up my proposed fix and creating the review. I think this is the correct fix in short term before we can legalize the vector atomic in instruction selection for all backend. LGTM. https://reviews.llvm.org/D24365