|
| 1 | +// RUN: mlir-translate -mlir-to-llvmir -split-input-file %s | FileCheck %s |
| 2 | + |
| 3 | +// CHECK-LABEL: define void @unsafe_fp_math_func_true() |
| 4 | +// CHECK-SAME: #[[ATTRS:[0-9]+]] |
| 5 | +llvm.func @unsafe_fp_math_func_true() attributes {unsafe_fp_math = true} { |
| 6 | + llvm.return |
| 7 | +} |
| 8 | +// CHECK: attributes #[[ATTRS]] = { "unsafe-fp-math"="true" } |
| 9 | + |
| 10 | +// ----- |
| 11 | + |
| 12 | +// CHECK-LABEL: define void @unsafe_fp_math_func_false() |
| 13 | +// CHECK-SAME: #[[ATTRS:[0-9]+]] |
| 14 | +llvm.func @unsafe_fp_math_func_false() attributes {unsafe_fp_math = false} { |
| 15 | + llvm.return |
| 16 | +} |
| 17 | +// CHECK: attributes #[[ATTRS]] = { "unsafe-fp-math"="false" } |
| 18 | + |
| 19 | +// ----- |
| 20 | + |
| 21 | +// CHECK-LABEL: define void @no_infs_fp_math_func_true() |
| 22 | +// CHECK-SAME: #[[ATTRS:[0-9]+]] |
| 23 | +llvm.func @no_infs_fp_math_func_true() attributes {no_infs_fp_math = true} { |
| 24 | + llvm.return |
| 25 | +} |
| 26 | +// CHECK: attributes #[[ATTRS]] = { "no-infs-fp-math"="true" } |
| 27 | + |
| 28 | +// ----- |
| 29 | + |
| 30 | +// CHECK-LABEL: define void @no_infs_fp_math_func_false() |
| 31 | +// CHECK-SAME: #[[ATTRS:[0-9]+]] |
| 32 | +llvm.func @no_infs_fp_math_func_false() attributes {no_infs_fp_math = false} { |
| 33 | + llvm.return |
| 34 | +} |
| 35 | +// CHECK: attributes #[[ATTRS]] = { "no-infs-fp-math"="false" } |
| 36 | + |
| 37 | +// ----- |
| 38 | + |
| 39 | +// CHECK-LABEL: define void @no_nans_fp_math_func_true() |
| 40 | +// CHECK-SAME: #[[ATTRS:[0-9]+]] |
| 41 | +llvm.func @no_nans_fp_math_func_true() attributes {no_nans_fp_math = true} { |
| 42 | + llvm.return |
| 43 | +} |
| 44 | +// CHECK: attributes #[[ATTRS]] = { "no-nans-fp-math"="true" } |
| 45 | + |
| 46 | +// ----- |
| 47 | + |
| 48 | +// CHECK-LABEL: define void @no_nans_fp_math_func_false() |
| 49 | +// CHECK-SAME: #[[ATTRS:[0-9]+]] |
| 50 | +llvm.func @no_nans_fp_math_func_false() attributes {no_nans_fp_math = false} { |
| 51 | + llvm.return |
| 52 | +} |
| 53 | +// CHECK: attributes #[[ATTRS]] = { "no-nans-fp-math"="false" } |
| 54 | + |
| 55 | +// ----- |
| 56 | + |
| 57 | +// CHECK-LABEL: define void @approx_func_fp_math_func_true() |
| 58 | +// CHECK-SAME: #[[ATTRS:[0-9]+]] |
| 59 | +llvm.func @approx_func_fp_math_func_true() attributes {approx_func_fp_math = true} { |
| 60 | + llvm.return |
| 61 | +} |
| 62 | +// CHECK: attributes #[[ATTRS]] = { "approx-func-fp-math"="true" } |
| 63 | + |
| 64 | +// ----- |
| 65 | +// |
| 66 | +// CHECK-LABEL: define void @approx_func_fp_math_func_false() |
| 67 | +// CHECK-SAME: #[[ATTRS:[0-9]+]] |
| 68 | +llvm.func @approx_func_fp_math_func_false() attributes {approx_func_fp_math = false} { |
| 69 | + llvm.return |
| 70 | +} |
| 71 | +// CHECK: attributes #[[ATTRS]] = { "approx-func-fp-math"="false" } |
| 72 | + |
| 73 | +// ----- |
| 74 | + |
| 75 | +// CHECK-LABEL: define void @no_signed_zeros_fp_math_func_true() |
| 76 | +// CHECK-SAME: #[[ATTRS:[0-9]+]] |
| 77 | +llvm.func @no_signed_zeros_fp_math_func_true() attributes {no_signed_zeros_fp_math = true} { |
| 78 | + llvm.return |
| 79 | +} |
| 80 | +// CHECK: attributes #[[ATTRS]] = { "no-signed-zeros-fp-math"="true" } |
| 81 | + |
| 82 | +// ----- |
| 83 | + |
| 84 | +// CHECK-LABEL: define void @no_signed_zeros_fp_math_func_false() |
| 85 | +// CHECK-SAME: #[[ATTRS:[0-9]+]] |
| 86 | +llvm.func @no_signed_zeros_fp_math_func_false() attributes {no_signed_zeros_fp_math = false} { |
| 87 | + llvm.return |
| 88 | +} |
| 89 | +// CHECK: attributes #[[ATTRS]] = { "no-signed-zeros-fp-math"="false" } |
0 commit comments