[PATCH] D124724: [Clang][OpenMP] Add the support for floating-point variables for specific atomic clauses

Shilei Tian via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 2 13:54:54 PDT 2022


tianshilei1992 added inline comments.


================
Comment at: clang/lib/CodeGen/CGStmtOpenMP.cpp:5936-5939
+          CGF.Builder.CreateCast(X.getType()->hasSignedIntegerRepresentation()
+                                     ? llvm::Instruction::CastOps::SIToFP
+                                     : llvm::Instruction::CastOps::UIToFP,
+                                 IC, X.getAddress(CGF).getElementType());
----------------
ABataev wrote:
> Do we have a test for this? If `X` is not integer, I rather doubt that hasSignedIntegerRepresentation is meaningful here
I think you're right. How can we check if `Update` is signed or not?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124724



More information about the cfe-commits mailing list