Files
llvm-project/offload/test/offloading/test_libc.cpp
Nick Sarnie 38a46a12c4 [offload][lit] Disable tests failing on Intel GPU (#189422)
Fix some tests causing hangs, one fail, and a few XPASSing. We are
seeing new passes/fails because of the named barrier changes being
merged.

Signed-off-by: Nick Sarnie <nick.sarnie@intel.com>
2026-03-30 18:02:34 +00:00

30 lines
581 B
C++

// RUN: %libomptarget-compilexx-run-and-check-generic
// UNSUPPORTED: intelgpu
#include <algorithm>
extern "C" int printf(const char *, ...);
// std::equal is lowered to libc function memcmp.
void test_memcpy() {
int r = 0;
#pragma omp target map(from : r)
{
int x[2] = {0, 0};
int y[2] = {0, 0};
int z[2] = {0, 1};
bool eq1 = std::equal(x, x + 2, y);
bool eq2 = std::equal(x, x + 2, z);
r = eq1 && !eq2;
}
printf("memcmp: %s\n", r ? "PASS" : "FAIL");
}
int main(int argc, char *argv[]) {
test_memcpy();
return 0;
}
// CHECK: memcmp: PASS