1 // RUN: %clang_cc1 -fno-strict-float-cast-overflow %s -emit-llvm -o - | FileCheck %s --check-prefix=NOSTRICT
3 // When compiling with non-standard semantics, use intrinsics to inhibit the optimizer.
4 // This used to require a function attribute, so we check that it is NOT here anymore.
6 // NOSTRICT-LABEL: main
7 // NOSTRICT: call i32 @llvm.fptosi.sat.i32.f64
8 // NOSTRICT: call i32 @llvm.fptoui.sat.i32.f64
9 // NOSTRICT-NOT: strict-float-cast-overflow
11 // The workaround attribute is not applied by default.
13 // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s --check-prefix=STRICT
17 // STRICT-NOT: strict-float-cast-overflow
22 return (int)d
!= 1e20
&& (unsigned)d
!= 1e20
;