brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · b36fb42 Raw
33 lines · plain
1! REQUIRES: x86-registered-target2! RUN: bbc -target x86_64-unknown-linux-gnu -emit-fir %s -o - --math-runtime=fast | FileCheck --check-prefixes=ALL %s3! RUN: %flang_fc1 -triple x86_64-unknown-linux-gnu -emit-fir -mllvm -math-runtime=fast %s -o - | FileCheck --check-prefixes=ALL %s4! RUN: bbc -target x86_64-unknown-linux-gnu -emit-fir %s -o - --math-runtime=relaxed | FileCheck --check-prefixes=ALL %s5! RUN: %flang_fc1 -triple x86_64-unknown-linux-gnu -emit-fir -mllvm -math-runtime=relaxed %s -o - | FileCheck --check-prefixes=ALL %s6! RUN: bbc -target x86_64-unknown-linux-gnu -emit-fir %s -o - --math-runtime=precise | FileCheck --check-prefixes=ALL %s7! RUN: %flang_fc1 -triple x86_64-unknown-linux-gnu -emit-fir -mllvm -math-runtime=precise %s -o - | FileCheck --check-prefixes=ALL %s8 9function test_real4(x)10  real :: x, test_real411  test_real4 = aint(x)12end function13 14! ALL-LABEL: @_QPtest_real415! ALL: {{%[A-Za-z0-9._]+}} = fir.call @llvm.trunc.f32({{%[A-Za-z0-9._]+}}) {{.*}}: (f32) -> f3216 17function test_real8(x)18  real(8) :: x, test_real819  test_real8 = aint(x)20end function21 22! ALL-LABEL: @_QPtest_real823! ALL: {{%[A-Za-z0-9._]+}} = fir.call @llvm.trunc.f64({{%[A-Za-z0-9._]+}}) {{.*}}: (f64) -> f6424 25! TODO: wait until fp128 is supported well in llvm.trunc26!function test_real16(x)27!  real(16) :: x, test_real1628!  test_real16 = aint(x)29!end function30 31! ALL-DAG: func.func private @llvm.trunc.f32(f32) -> f32 attributes {fir.bindc_name = "llvm.trunc.f32", fir.runtime}32! ALL-DAG: func.func private @llvm.trunc.f64(f64) -> f64 attributes {fir.bindc_name = "llvm.trunc.f64", fir.runtime}33