[RISCV] emit .option directive for functions with target features which differ from...
[llvm-project.git] / llvm / test / Other / opt-override-denormal-fp-math-f32.ll
blobd7ee5b8cd1d2b59905f8ed1ee23484f895cb3b9a
1 ; RUN: opt -S -denormal-fp-math-f32=ieee %s | FileCheck -check-prefixes=IEEE,ALL %s
2 ; RUN: opt -S -denormal-fp-math-f32=preserve-sign %s | FileCheck -check-prefixes=PRESERVESIGN,ALL %s
3 ; RUN: opt -S -denormal-fp-math-f32=positive-zero %s | FileCheck -check-prefixes=POSITIVEZERO,ALL %s
5 ; ALL: @no_denormal_fp_math_f32_attr() [[NOATTR:#[0-9]+]] {
6 define i32 @no_denormal_fp_math_f32_attr() #0 {
7 entry:
8   ret i32 0
11 ; ALL: denormal_fp_math_attr_preserve_sign_ieee() [[ATTR:#[0-9]+]] {
12 define i32 @denormal_fp_math_attr_preserve_sign_ieee() #1 {
13 entry:
14   ret i32 0
17 ; ALL-DAG: attributes [[ATTR]] = { nounwind "denormal-fp-math-f32"="preserve-sign,ieee" }
18 ; IEEE-DAG: attributes [[NOATTR]] = { nounwind "denormal-fp-math-f32"="ieee,ieee" }
19 ; PRESERVESIGN-DAG: attributes [[NOATTR]] = { nounwind "denormal-fp-math-f32"="preserve-sign,preserve-sign" }
20 ; POSITIVEZERO-DAG: attributes [[NOATTR]] = { nounwind "denormal-fp-math-f32"="positive-zero,positive-zero" }
22 attributes #0 = { nounwind }
23 attributes #1 = { nounwind "denormal-fp-math-f32"="preserve-sign,ieee" }