2011-10-28 03:19:51 +08:00
|
|
|
// 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
|
2012-04-14 20:37:26 +08:00
|
|
|
// CHECK: fdiv{{.*}}, !fpmath ![[MD:[0-9]+]]
|
2011-10-28 03:19:51 +08:00
|
|
|
return a / b;
|
|
|
|
}
|
|
|
|
|
|
|
|
float4 spvectordiv(float4 a, float4 b) {
|
|
|
|
// CHECK: @spvectordiv
|
2012-04-14 20:37:26 +08:00
|
|
|
// CHECK: fdiv{{.*}}, !fpmath ![[MD]]
|
2011-10-28 03:19:51 +08:00
|
|
|
return a / b;
|
|
|
|
}
|
|
|
|
|
|
|
|
#pragma OPENCL EXTENSION cl_khr_fp64 : enable
|
|
|
|
|
|
|
|
double dpscalardiv(double a, double b) {
|
|
|
|
// CHECK: @dpscalardiv
|
2012-04-14 20:37:26 +08:00
|
|
|
// CHECK-NOT: !fpmath
|
2011-10-28 03:19:51 +08:00
|
|
|
return a / b;
|
|
|
|
}
|
|
|
|
|
2014-12-16 03:10:08 +08:00
|
|
|
// CHECK: ![[MD]] = !{float 2.500000e+00}
|