[PATCH] D130457: [IRBuilder] Add assert in CreateAtomicRMW

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 25 11:06:31 PDT 2022


efriedma added inline comments.


================
Comment at: llvm/include/llvm/IR/IRBuilder.h:1718
+    assert(Ordering != AtomicOrdering::Unordered &&
+           "atomicrmw instructions cannot be unordered");
     if (!Align) {
----------------
Please put the assertion in AtomicRMWInst::setOrdering, so we catch other ways of creating/modifying the ordering of an AtomicRMWInst.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D130457/new/

https://reviews.llvm.org/D130457



More information about the llvm-commits mailing list