[PATCH] D118227: [OpenMP][IRBuilder] Fix AllocIP for atomic update and capture

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 4 09:40:41 PST 2022


Meinersbur added a comment.

The title is "Fix AllocIP for atomic update and capture", but reading the summary the main motivation seems to be to fix `createAtomicUpdate` for floats.



================
Comment at: llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:3384-3386
+    Builder.restoreIP(AllocaIP);
+    AllocaInst *NewAtomicAddr = Builder.CreateAlloca(XElemTy);
+    NewAtomicAddr->setName(X->getName() + "x.new.val");
----------------
Is this move relevant?

If this is due to `AllocaIP` and `Loc.IP` being the same, you could take the occasion and check that they are different since is would be ambiguous which one is "first". See `isConflictIP` in D117226.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D118227



More information about the llvm-commits mailing list