diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2012-04-14 14:01:31 +0000 |
| commit | dbe13110f59f48b4dbb7552b3ac2935acdeece7f (patch) | |
| tree | be1815eb79b42ff482a8562b13c2dcbf0c5dcbee /test/CodeGenOpenCL/fpaccuracy.cl | |
| parent | 9da628931ebf2609493570f87824ca22402cc65f (diff) | |
Vendor import of clang trunk r154661:vendor/clang/clang-trunk-r154661
Notes
svn path=/vendor/clang/dist/; revision=234287
svn path=/vendor/clang/clang-trunk-r154661/; revision=234288; tag=vendor/clang/clang-trunk-r154661
Diffstat (limited to 'test/CodeGenOpenCL/fpaccuracy.cl')
| -rw-r--r-- | test/CodeGenOpenCL/fpaccuracy.cl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/CodeGenOpenCL/fpaccuracy.cl b/test/CodeGenOpenCL/fpaccuracy.cl new file mode 100644 index 000000000000..d27316a799f3 --- /dev/null +++ b/test/CodeGenOpenCL/fpaccuracy.cl @@ -0,0 +1,25 @@ +// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s + +typedef __attribute__(( ext_vector_type(4) )) float float4; + +float spscalardiv(float a, float b) { + // CHECK: @spscalardiv + // CHECK: fdiv{{.*}}, !fpaccuracy ![[MD:[0-9]+]] + return a / b; +} + +float4 spvectordiv(float4 a, float4 b) { + // CHECK: @spvectordiv + // CHECK: fdiv{{.*}}, !fpaccuracy ![[MD]] + return a / b; +} + +#pragma OPENCL EXTENSION cl_khr_fp64 : enable + +double dpscalardiv(double a, double b) { + // CHECK: @dpscalardiv + // CHECK-NOT: !fpaccuracy + return a / b; +} + +// CHECK: ![[MD]] = metadata !{float 2.500000e+00} |
