[PATCH] D75077: [OpenMP5.0] Allow pointer arithmetic in motion/map clause

Chi Chun Chen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 27 12:23:24 PST 2020


cchen marked 2 inline comments as done.
cchen added inline comments.


================
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");
----------------
ABataev wrote:
> Not sure this should be an assert. What if you have something like `*((a+b) + c)` and `a+b` is not pointer arithmetic?
Good point, I'll fix it. Thanks


================
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]]
----------------
ABataev wrote:
> Must be just `[[TWO]]`?
You mean use a more representable name?


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