xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenOpenCL/half.cl (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
2*f4a2713aSLionel Sambuc
3*f4a2713aSLionel Sambuc#pragma OPENCL EXTENSION cl_khr_fp16 : enable
4*f4a2713aSLionel Sambuc
5*f4a2713aSLionel Sambuc
6*f4a2713aSLionel Sambuchalf test()
7*f4a2713aSLionel Sambuc{
8*f4a2713aSLionel Sambuc   half x = 0.1f;
9*f4a2713aSLionel Sambuc   x+=2.0f;
10*f4a2713aSLionel Sambuc   x-=2.0f;
11*f4a2713aSLionel Sambuc   half y = x + x;
12*f4a2713aSLionel Sambuc   half z = y * 1.0f;
13*f4a2713aSLionel Sambuc   return z;
14*f4a2713aSLionel Sambuc// CHECK: half 0xH3260
15*f4a2713aSLionel Sambuc}
16