| 1 |
; RUN: llc -enable-ppc-gen-scalar-mass -O3 -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s |
| 2 |
; RUN: llc -enable-ppc-gen-scalar-mass -O3 -mtriple=powerpc-ibm-aix-xcoff < %s | FileCheck %s |
| 3 |
|
| 4 |
declare float @llvm.cos.f32(float) |
| 5 |
declare float @llvm.exp.f32(float) |
| 6 |
declare float @llvm.log10.f32(float) |
| 7 |
declare float @llvm.log.f32(float) |
| 8 |
declare float @llvm.pow.f32(float, float) |
| 9 |
declare float @llvm.rint.f32(float) |
| 10 |
declare float @llvm.sin.f32(float) |
| 11 |
declare double @llvm.cos.f64(double) |
| 12 |
declare double @llvm.exp.f64(double) |
| 13 |
declare double @llvm.log.f64(double) |
| 14 |
declare double @llvm.log10.f64(double) |
| 15 |
declare double @llvm.pow.f64(double, double) |
| 16 |
declare double @llvm.sin.f64(double) |
| 17 |
|
| 18 |
|
| 19 |
; With no fast math flag specified per-function |
| 20 |
define float @cosf_f32_nofast(float %a) { |
| 21 |
; CHECK-LABEL: cosf_f32_nofast |
| 22 |
; CHECK-NOT: bl __xl_cosf |
| 23 |
; CHECK: blr |
| 24 |
entry: |
| 25 |
%0 = tail call float @llvm.cos.f32(float %a) |
| 26 |
ret float %0 |
| 27 |
} |
| 28 |
|
| 29 |
; With no fast math flag specified per-function |
| 30 |
define float @expf_f32_nofast(float %a) { |
| 31 |
; CHECK-LABEL: expf_f32_nofast |
| 32 |
; CHECK-NOT: bl __xl_expf |
| 33 |
; CHECK: blr |
| 34 |
entry: |
| 35 |
%0 = tail call float @llvm.exp.f32(float %a) |
| 36 |
ret float %0 |
| 37 |
} |
| 38 |
|
| 39 |
; With no fast math flag specified per-function |
| 40 |
define float @log10f_f32_nofast(float %a) { |
| 41 |
; CHECK-LABEL: log10f_f32_nofast |
| 42 |
; CHECK-NOT: bl __xl_log10f |
| 43 |
; CHECK: blr |
| 44 |
entry: |
| 45 |
%0 = tail call float @llvm.log10.f32(float %a) |
| 46 |
ret float %0 |
| 47 |
} |
| 48 |
|
| 49 |
; With no fast math flag specified per-function |
| 50 |
define float @logf_f32_nofast(float %a) { |
| 51 |
; CHECK-LABEL: logf_f32_nofast |
| 52 |
; CHECK-NOT: bl __xl_logf |
| 53 |
; CHECK: blr |
| 54 |
entry: |
| 55 |
%0 = tail call float @llvm.log.f32(float %a) |
| 56 |
ret float %0 |
| 57 |
} |
| 58 |
|
| 59 |
; With no fast math flag specified per-function |
| 60 |
define float @powf_f32_nofast(float %a, float %b) { |
| 61 |
; CHECK-LABEL: powf_f32_nofast |
| 62 |
; CHECK-NOT: bl __xl_powf |
| 63 |
; CHECK: blr |
| 64 |
entry: |
| 65 |
%0 = tail call float @llvm.pow.f32(float %a, float %b) |
| 66 |
ret float %0 |
| 67 |
} |
| 68 |
|
| 69 |
; With no fast math flag specified per-function |
| 70 |
define float @rintf_f32_nofast(float %a) { |
| 71 |
; CHECK-LABEL: rintf_f32_nofast |
| 72 |
; CHECK-NOT: bl __xl_rintf |
| 73 |
; CHECK: blr |
| 74 |
entry: |
| 75 |
%0 = tail call float @llvm.rint.f32(float %a) |
| 76 |
ret float %0 |
| 77 |
} |
| 78 |
|
| 79 |
; With no fast math flag specified per-function |
| 80 |
define float @sinf_f32_nofast(float %a) { |
| 81 |
; CHECK-LABEL: sinf_f32_nofast |
| 82 |
; CHECK-NOT: bl __xl_sinf |
| 83 |
; CHECK: blr |
| 84 |
entry: |
| 85 |
%0 = tail call float @llvm.sin.f32(float %a) |
| 86 |
ret float %0 |
| 87 |
} |
| 88 |
|
| 89 |
; With no fast math flag specified per-function |
| 90 |
define double @cos_f64_nofast(double %a) { |
| 91 |
; CHECK-LABEL: cos_f64_nofast |
| 92 |
; CHECK-NOT: bl __xl_cos |
| 93 |
; CHECK: blr |
| 94 |
entry: |
| 95 |
%0 = tail call double @llvm.cos.f64(double %a) |
| 96 |
ret double %0 |
| 97 |
} |
| 98 |
|
| 99 |
; With no fast math flag specified per-function |
| 100 |
define double @exp_f64_nofast(double %a) { |
| 101 |
; CHECK-LABEL: exp_f64_nofast |
| 102 |
; CHECK-NOT: bl __xl_exp |
| 103 |
; CHECK: blr |
| 104 |
entry: |
| 105 |
%0 = tail call double @llvm.exp.f64(double %a) |
| 106 |
ret double %0 |
| 107 |
} |
| 108 |
|
| 109 |
; With no fast math flag specified per-function |
| 110 |
define double @log_f64_nofast(double %a) { |
| 111 |
; CHECK-LABEL: log_f64_nofast |
| 112 |
; CHECK-NOT: bl __xl_log |
| 113 |
; CHECK: blr |
| 114 |
entry: |
| 115 |
%0 = tail call double @llvm.log.f64(double %a) |
| 116 |
ret double %0 |
| 117 |
} |
| 118 |
|
| 119 |
; With no fast math flag specified per-function |
| 120 |
define double @log10_f64_nofast(double %a) { |
| 121 |
; CHECK-LABEL: log10_f64_nofast |
| 122 |
; CHECK-NOT: bl __xl_log10 |
| 123 |
; CHECK: blr |
| 124 |
entry: |
| 125 |
%0 = tail call double @llvm.log10.f64(double %a) |
| 126 |
ret double %0 |
| 127 |
} |
| 128 |
|
| 129 |
; With no fast math flag specified per-function |
| 130 |
define double @pow_f64_nofast(double %a, double %b) { |
| 131 |
; CHECK-LABEL: pow_f64_nofast |
| 132 |
; CHECK-NOT: bl __xl_pow |
| 133 |
; CHECK: blr |
| 134 |
entry: |
| 135 |
%0 = tail call double @llvm.pow.f64(double %a, double %b) |
| 136 |
ret double %0 |
| 137 |
} |
| 138 |
|
| 139 |
; With no fast math flag specified per-function |
| 140 |
define double @sin_f64_nofast(double %a) { |
| 141 |
; CHECK-LABEL: sin_f64_nofast |
| 142 |
; CHECK-NOT: bl __xl_sin |
| 143 |
; CHECK: blr |
| 144 |
entry: |
| 145 |
%0 = tail call double @llvm.sin.f64(double %a) |
| 146 |
ret double %0 |
| 147 |
} |