[all-commits] [llvm/llvm-project] 51168c: [OpenMP] Add test for custom state machine if have...

Joel E. Denny via All-commits all-commits at lists.llvm.org
Fri Dec 10 09:56:26 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 51168ce8d574360a50446c5795b9f5a68c693fca
      https://github.com/llvm/llvm-project/commit/51168ce8d574360a50446c5795b9f5a68c693fca
  Author: Joel E. Denny <jdenny.ornl at gmail.com>
  Date:   2021-12-10 (Fri, 10 Dec 2021)

  Changed paths:
    M llvm/include/llvm/Frontend/OpenMP/OMPKinds.def
    M openmp/libomptarget/test/offloading/bug51781.c

  Log Message:
  -----------
  [OpenMP] Add test for custom state machine if have reduction

D113602 broke the custom state machine when a reduction is present, as
revealed by the reproducer this patch adds to the test suite.  In that
case, openmp-opts changes the return value to undef in
`__kmpc_get_warp_size` (which the custom state machine calls as of
D113602).  Later optimizations then optimize away the custom state
machine code as if all threads are outside the thread block, so the
target region does not execute.  D114802 fixed that but didn't add a
reproducer.

This patch also adds a `__OMP_RTL_ATTRS` entry for
`__kmpc_get_warp_size` to OMPKinds.def, which D113602 missed.  This
change does not seem to have any impact on the reduction problem.

Reviewed By: JonChesterfield, jdoerfert

Differential Revision: https://reviews.llvm.org/D113824




More information about the All-commits mailing list