[PATCH] D75077: [OpenMP5.0] Allow pointer arithmetic in motion/map clause
Alexey Bataev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Feb 27 11:46:38 PST 2020
ABataev added inline comments.
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:15690
+ return false;
+ if (!UO->isLValue()) {
+ emitErrorMsg();
----------------
Hmm, addr_of creates rvalues.
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:15693
+ return false;
+ } else {
+ if (!RelevantExpr) {
----------------
No need for `else` here
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:15710
+ // know the other subtree is just an offset)
+ assert(BO->getType()->isPointerType() &&
+ "Expect the binary operator be pointer type");
----------------
Not sure this should be an assert. What if you have something like `*((a+b) + c)` and `a+b` is not pointer arithmetic?
================
Comment at: clang/lib/Sema/SemaOpenMP.cpp:15720
+ return Visit(LE);
+ else
+ return Visit(RE);
----------------
No need for `else` here
================
Comment at: clang/test/OpenMP/target_update_codegen.cpp:374
+ // CK6-64-DAG: [[IDX_EXT]] = sext i32 [[TWO:%.+]] to i64
+ // CK6-DAG: [[TWO:%.+]] = load i32, i32* [[L_ADDR:%.+]]
+ // CK6-DAG: store i32 [[L:%.+]], i32* [[L_ADDR]]
----------------
Must be just `[[TWO]]`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75077/new/
https://reviews.llvm.org/D75077
More information about the cfe-commits
mailing list