blob: 47fca696f9af726a6b83bccc4dfa0033b5c94378 [file] [log] [blame]
Peter Collingbournec5096cb2011-10-27 19:19:51 +00001// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
2
3typedef __attribute__(( ext_vector_type(4) )) float float4;
4
5float spscalardiv(float a, float b) {
6 // CHECK: @spscalardiv
7 // CHECK: fdiv{{.*}}, !fpaccuracy ![[MD:[0-9]+]]
8 return a / b;
9}
10
11float4 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
19double 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}