1 // RUN: %clang -target aarch64 -emit-llvm -S %s -o - | FileCheck %s
2 // RUN: %clang -target lanai -emit-llvm -S %s -o - | FileCheck %s
3 // RUN: %clang -target riscv64 -emit-llvm -S %s -o - | FileCheck %s
4 // RUN: %clang -target x86_64 -emit-llvm -S %s -o - | FileCheck %s
6 // Run a variety of targets to ensure there's no target-based difference.
8 // An SNaN with no payload is formed by setting the bit after the
9 // the quiet bit (MSB of the significand).
11 // CHECK: float 0x7FF8000000000000, float 0x7FF4000000000000
19 // Doubles are created and converted to floats.
20 // Converting (truncating) to float quiets the NaN (sets the MSB
21 // of the significand) and raises the APFloat invalidOp exception
22 // but that should not cause a compilation error in the default
23 // (ignore FP exceptions) mode.
25 // CHECK: float 0x7FF8000000000000, float 0x7FFC000000000000
27 float converted_to_float
[] = {
32 // CHECK: double 0x7FF8000000000000, double 0x7FF4000000000000