Skip to content

Commit

Permalink
Test for reducer struct member register and unregister.
Browse files Browse the repository at this point in the history
This test currently fails because registration is not working.
  • Loading branch information
VoxSciurorum committed Aug 27, 2024
1 parent 2c05a05 commit 19f4037
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions clang/test/Cilk/hyper-register.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// RUN: %clang_cc1 %s -x c++ -fopencilk -S -emit-llvm -disable-llvm-passes -triple aarch64-freebsd14.1 -o - | FileCheck %s

struct S {
static void identity(void *);
static void reduce(void *, void *);
int _Hyperobject(identity, reduce) member;
S();
~S();
};

// CHECK-LABEL: _ZN1SC2Ev
// CHECK: call void @llvm.reducer.register
S::S() {}

// CHECK-LABEL: _ZN1SD2Ev
// CHECK: call void @llvm.reducer.unregister
S::~S() {}

void f() {
struct S s;
}

0 comments on commit 19f4037

Please sign in to comment.