Peter Collingbourne | c5096cb | 2011-10-27 19:19:51 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s |
| 2 | |
| 3 | typedef __attribute__(( ext_vector_type(4) )) float float4; |
| 4 | |
| 5 | float spscalardiv(float a, float b) { |
| 6 | // CHECK: @spscalardiv |
| 7 | // CHECK: fdiv{{.*}}, !fpaccuracy ![[MD:[0-9]+]] |
| 8 | return a / b; |
| 9 | } |
| 10 | |
| 11 | float4 spvectordiv(float4 a, float4 b) { |
| 12 | // CHECK: @spvectordiv |
| 13 | // CHECK: fdiv{{.*}}, !fpaccuracy ![[MD]] |
| 14 | return a / b; |
| 15 | } |
| 16 | |
| 17 | #pragma OPENCL EXTENSION cl_khr_fp64 : enable |
| 18 | |
| 19 | double dpscalardiv(double a, double b) { |
| 20 | // CHECK: @dpscalardiv |
| 21 | // CHECK-NOT: !fpaccuracy |
| 22 | return a / b; |
| 23 | } |
| 24 | |
| 25 | // CHECK: ![[MD]] = metadata !{i{{[0-9]+}} 5, i{{[0-9]+}} 2} |