[PATCH] D101952: [OpenMP] Fix non-determinism in clang copyin codegen
Giorgis Georgakoudis via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 5 18:05:29 PDT 2021
ggeorgakoudis updated this revision to Diff 343256.
ggeorgakoudis added a comment.
Update by Johanne's correction on the source of non-determinism
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101952/new/
https://reviews.llvm.org/D101952
Files:
clang/lib/CodeGen/CGStmtOpenMP.cpp
Index: clang/lib/CodeGen/CGStmtOpenMP.cpp
===================================================================
--- clang/lib/CodeGen/CGStmtOpenMP.cpp
+++ clang/lib/CodeGen/CGStmtOpenMP.cpp
@@ -1006,12 +1006,11 @@
// need to copy data.
CopyBegin = createBasicBlock("copyin.not.master");
CopyEnd = createBasicBlock("copyin.not.master.end");
- Builder.CreateCondBr(
- Builder.CreateICmpNE(
- Builder.CreatePtrToInt(MasterAddr.getPointer(), CGM.IntPtrTy),
- Builder.CreatePtrToInt(PrivateAddr.getPointer(),
- CGM.IntPtrTy)),
- CopyBegin, CopyEnd);
+ auto *A =
+ Builder.CreatePtrToInt(MasterAddr.getPointer(), CGM.IntPtrTy);
+ auto *B =
+ Builder.CreatePtrToInt(PrivateAddr.getPointer(), CGM.IntPtrTy);
+ Builder.CreateCondBr(Builder.CreateICmpNE(A, B), CopyBegin, CopyEnd);
EmitBlock(CopyBegin);
}
const auto *SrcVD =
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D101952.343256.patch
Type: text/x-patch
Size: 1038 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210506/63d2c7c0/attachment.bin>
More information about the cfe-commits
mailing list