llvm-project/clang/test/CodeGen/rounding-math.cpp
Fangrui Song c5de4dd1ea [test] %clang_cc1 -emit-llvm: remove redundant -S
And replace -emit-llvm -o - with -emit-llvm-only
2024-05-04 17:00:29 -07:00

14 lines
451 B
C++

// RUN: %clang_cc1 -emit-llvm -triple i386-linux -Wno-unknown-pragmas -frounding-math %s -o - | FileCheck %s
constexpr float func_01(float x, float y) {
return x + y;
}
float V1 = func_01(1.0F, 0x0.000001p0F);
float V2 = 1.0F + 0x0.000001p0F;
float V3 = func_01(1.0F, 2.0F);
// CHECK: @V1 = {{.*}}global float 1.000000e+00, align 4
// CHECK: @V2 = {{.*}}global float 1.000000e+00, align 4
// CHECK: @V3 = {{.*}}global float 3.000000e+00, align 4