[clang] Implement lifetime analysis for lifetime_capture_by(X) (#115921)
[llvm-project.git] / clang / test / Headers / cuda_wrapper_algorithm.cu
blobd514285f7e17bb0a48b5b0879b5163d3e74a9d67
1 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
3 // RUN: %clang_cc1 \
4 // RUN:   -internal-isystem %S/../../lib/Headers/cuda_wrappers \
5 // RUN:   -internal-isystem %S/Inputs/include \
6 // RUN:   -triple x86_64-unknown-unknown \
7 // RUN:   -emit-llvm %s -O1 -o - \
8 // RUN:   | FileCheck %s
10 #define __host__ __attribute__((host))
11 #define __device__ __attribute__((device))
13 #include <algorithm>
15 extern "C" bool cmp(double a, double b) { return a<b; }
17 // CHECK-LABEL: @test_std_min(
18 // CHECK-NEXT:  entry:
19 // CHECK-NEXT:    ret double 0x7FF8000000000000
21 extern "C" double test_std_min() {
22   return std::min(__builtin_nan(""), 0.0);
25 // CHECK-LABEL: @test_std_min_cmp(
26 // CHECK-NEXT:  entry:
27 // CHECK-NEXT:    ret double 0x7FF8000000000000
29 extern "C" double test_std_min_cmp() {
30   return std::min(__builtin_nan(""), 0.0, cmp);
33 // CHECK-LABEL: @test_std_max(
34 // CHECK-NEXT:  entry:
35 // CHECK-NEXT:    ret double 0x7FF8000000000000
37 extern "C" double test_std_max() {
38   return std::max(__builtin_nan(""), 0.0);
41 // CHECK-LABEL: @test_std_max_cmp(
42 // CHECK-NEXT:  entry:
43 // CHECK-NEXT:    ret double 0x7FF8000000000000
45 extern "C" double test_std_max_cmp() {
46   return std::max(__builtin_nan(""), 0.0, cmp);