30 lines · plain
1! RUN: bbc -emit-fir --math-runtime=fast -outline-intrinsics %s -o - | FileCheck %s --check-prefixes="FIR,FAST"2! RUN: %flang_fc1 -emit-fir -mllvm -math-runtime=fast -mllvm -outline-intrinsics %s -o - | FileCheck %s --check-prefixes="FIR,FAST"3! RUN: bbc -emit-fir --math-runtime=relaxed -outline-intrinsics %s -o - | FileCheck %s --check-prefixes="FIR,RELAXED"4! RUN: %flang_fc1 -emit-fir -mllvm -math-runtime=relaxed -mllvm -outline-intrinsics %s -o - | FileCheck %s --check-prefixes="FIR,RELAXED"5! RUN: bbc -emit-fir --math-runtime=precise -outline-intrinsics %s -o - | FileCheck %s --check-prefixes="FIR,PRECISE"6! RUN: %flang_fc1 -emit-fir -mllvm -math-runtime=precise -mllvm -outline-intrinsics %s -o - | FileCheck %s --check-prefixes="FIR,PRECISE"7 8! CHECK-LABEL: cos_testr9subroutine cos_testr(a, b)10 real :: a, b11! FIR: fir.call @fir.cos.contract.f32.f3212 b = cos(a)13end subroutine14 15! CHECK-LABEL: cos_testd16subroutine cos_testd(a, b)17 real(kind=8) :: a, b18! FIR: fir.call @fir.cos.contract.f64.f6419 b = cos(a)20end subroutine21 22! FIR: @fir.cos.contract.f32.f32(%arg0: f32) -> f32 attributes23! FAST: math.cos %arg0 fastmath<contract> : f3224! RELAXED: math.cos %arg0 fastmath<contract> : f3225! PRECISE: fir.call @cosf(%arg0) fastmath<contract> : (f32) -> f3226! FIR: @fir.cos.contract.f64.f64(%arg0: f64) -> f6427! FAST: math.cos %arg0 fastmath<contract> : f6428! RELAXED: math.cos %arg0 fastmath<contract> : f6429! PRECISE: fir.call @cos(%arg0) fastmath<contract> : (f64) -> f6430