[PATCH] D40911: [OpenMP] Fix PR35542: Correct adjusting of private reduction variable

Jonas Hahnfeld via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 6 10:59:16 PST 2017


Hahnfeld created this revision.
Herald added a subscriber: cfe-commits.

The adjustment is calculated with CreatePtrDiff() which returns
the difference in (base) elements. This is passed to CreateGEP()
so make sure that the GEP base has the correct pointer type:
It needs to be a pointer to the base type, not a pointer to a
constant sized array.


Repository:
  rC Clang

https://reviews.llvm.org/D40911

Files:
  lib/CodeGen/CGOpenMPRuntime.cpp
  test/OpenMP/for_reduction_codegen.cpp
  test/OpenMP/for_reduction_codegen_UDR.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D40911.125765.patch
Type: text/x-patch
Size: 9941 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171206/f7dc2653/attachment.bin>


More information about the cfe-commits mailing list