diff --git a/SYCL/Regression/unoptimized_stream.cpp b/SYCL/Regression/unoptimized_stream.cpp new file mode 100644 index 0000000000..e9d800bdc2 --- /dev/null +++ b/SYCL/Regression/unoptimized_stream.cpp @@ -0,0 +1,20 @@ +// RUN: %clangxx -fsycl -fsycl-targets=%sycl_triple %s -O0 -o %t.out +// RUN: %HOST_RUN_PLACEHOLDER %t.out +// RUN: %CPU_RUN_PLACEHOLDER %t.out +// RUN: %GPU_RUN_PLACEHOLDER %t.out + +// NOTE: The libclc target used by the CUDA backend used to generate atomic load +// variants that were unsupported by NVPTX. Even if they were not used +// directly, sycl::stream and other operations would keep the invalid +// operations in when optimizations were disabled. + +#include + +int main() { + sycl::queue q; + q.submit([&](sycl::handler &cgh) { + sycl::stream os(1024, 256, cgh); + cgh.single_task([=]() { os << "test"; }); + }); + return 0; +}