1// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s -check-prefix=NORMAL 2// RUN: %clang_cc1 %s -emit-llvm -cl-fast-relaxed-math -o - | FileCheck %s -check-prefix=FAST 3// RUN: %clang_cc1 %s -emit-llvm -cl-finite-math-only -o - | FileCheck %s -check-prefix=FINITE 4// RUN: %clang_cc1 %s -emit-llvm -cl-unsafe-math-optimizations -o - | FileCheck %s -check-prefix=UNSAFE 5// RUN: %clang_cc1 %s -emit-llvm -cl-no-signed-zeros -o - | FileCheck %s -check-prefix=NOSZ 6 7typedef __attribute__(( ext_vector_type(4) )) float float4; 8 9float spscalardiv(float a, float b) { 10 // CHECK: @spscalardiv( 11 12 // NORMAL: fdiv float 13 // FAST: fdiv fast float 14 // FINITE: fdiv nnan ninf float 15 // UNSAFE: fdiv nnan float 16 // NOSZ: fdiv nsz float 17 return a / b; 18} 19// CHECK: attributes 20 21// NORMAL: "no-infs-fp-math"="false" 22// NORMAL: "no-nans-fp-math"="false" 23// NORMAL: "unsafe-fp-math"="false" 24 25// FAST: "no-infs-fp-math"="true" 26// FAST: "no-nans-fp-math"="true" 27// FAST: "unsafe-fp-math"="true" 28 29// FINITE: "no-infs-fp-math"="true" 30// FINITE: "no-nans-fp-math"="true" 31// FINITE: "unsafe-fp-math"="false" 32 33// UNSAFE: "no-infs-fp-math"="false" 34// UNSAFE: "no-nans-fp-math"="true" 35// UNSAFE: "unsafe-fp-math"="true" 36 37