llvm-project/flang/test/Fir/target-rewrite-fmfs.fir
Asher Mancinelli 595cc960b6
[flang] Propagate fast-math flags in target-rewrite (#135723)
TargetRewritePass was dropping fast-math flags. Add the flags to the new
call ops and update tests.
2025-04-15 05:43:32 -07:00

9 lines
335 B
Plaintext

// RUN: fir-opt --target-rewrite %s | FileCheck %s
// CHECK-LABEL: func.func @libm_preserves_fmfs
func.func @libm_preserves_fmfs(%arg0 : complex<f32>) -> complex<f32> {
%0 = fir.call @csin(%arg0) fastmath<contract> : (complex<f32>) -> complex<f32>
// CHECK: fir.call @csin(%{{.+}}) fastmath<contract>
return %0 : complex<f32>
}