mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-02 03:06:07 +00:00

operations (as opposed to storage only half/fp16). Also add some semantic checks for OpenCL half types. llvm-svn: 173254
16 lines
237 B
Common Lisp
16 lines
237 B
Common Lisp
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
|
|
|
|
#pragma OPENCL EXTENSION cl_khr_fp16 : enable
|
|
|
|
|
|
half test()
|
|
{
|
|
half x = 0.1f;
|
|
x+=2.0f;
|
|
x-=2.0f;
|
|
half y = x + x;
|
|
half z = y * 1.0f;
|
|
return z;
|
|
// CHECK: half 0xH3260
|
|
}
|