[PATCH] D120290: [Clang][OpenMP] Add the codegen support for `atomic compare capture`

Alexey Bataev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 22 05:47:58 PST 2022


ABataev added inline comments.


================
Comment at: clang/include/clang/AST/StmtOpenMP.h:2835-2847
   bool IsXLHSInRHSPart = false;
   /// Used for 'atomic update' or 'atomic capture' constructs. They may
   /// have atomic expressions of forms
   /// \code
   /// v = x; <update x>;
   /// <update x>; v = x;
   /// \endcode
----------------
Transform these booleans to bitfields?


================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:11556
   X = ThenBO->getLHS();
-  D = ThenBO->getRHS();
+  D = ThenBO->getRHS()->IgnoreImpCasts();
 
----------------
Need to be careful here, probably may need to cast to resulting type explicitly to avoid problems between int/float/etc. conversions.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120290



More information about the cfe-commits mailing list