1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259
|
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
; RUN: opt -cost-model -analyze -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 -denormal-fp-math-f32=preserve-sign -denormal-fp-math=preserve-sign -fp-contract=on < %s | FileCheck -check-prefixes=SLOWF64,FUSED,SLOWF32 %s
; RUN: opt -cost-model -analyze -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 -denormal-fp-math-f32=ieee -denormal-fp-math=ieee -fp-contract=on < %s | FileCheck -check-prefixes=SLOWF64,FASTF32,GFX9SLOW %s
; RUN: opt -cost-model -analyze -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 -denormal-fp-math-f32=ieee -denormal-fp-math=ieee -fp-contract=fast < %s | FileCheck -check-prefixes=FUSED,SLOWF32,GFX9FAST %s
; RUN: opt -cost-model -analyze -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx1030 -denormal-fp-math-f32=preserve-sign -denormal-fp-math=preserve-sign -fp-contract=on < %s | FileCheck -check-prefixes=SLOWF64,FUSED,FASTF32 %s
; RUN: opt -cost-model -cost-kind=code-size -analyze -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 -denormal-fp-math-f32=preserve-sign -denormal-fp-math=preserve-sign -fp-contract=on < %s | FileCheck -check-prefixes=SLOWF64-SIZE,FUSED-SIZE,SLOWF32-SIZE %s
; RUN: opt -cost-model -cost-kind=code-size -analyze -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 -denormal-fp-math-f32=ieee -denormal-fp-math=ieee -fp-contract=on < %s | FileCheck -check-prefixes=SLOWF64-SIZE,FASTF32-SIZE,GFX9SLOW-SIZE %s
; RUN: opt -cost-model -cost-kind=code-size -analyze -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx900 -denormal-fp-math-f32=ieee -denormal-fp-math=ieee -fp-contract=fast < %s | FileCheck -check-prefixes=FUSED-SIZE,SLOWF32-SIZE,GFX9FAST-SIZE %s
; RUN: opt -cost-model -cost-kind=code-size -analyze -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx1030 -denormal-fp-math-f32=preserve-sign -denormal-fp-math=preserve-sign -fp-contract=on < %s | FileCheck -check-prefixes=SLOWF64-SIZE,FUSED-SIZE,FASTF32-SIZE %s
; END.
target triple = "amdgcn--"
define void @fmul_fadd_f32() #0 {
; SLOWF32-LABEL: 'fmul_fadd_f32'
; SLOWF32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f32 = fmul float undef, undef
; SLOWF32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f32add = fadd float %f32, undef
; SLOWF32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f32c = fmul contract float undef, undef
; SLOWF32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f32cadd = fadd contract float %f32c, undef
; SLOWF32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f32 = fmul <2 x float> undef, undef
; SLOWF32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32add = fadd <2 x float> %v2f32, undef
; SLOWF32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f32_2 = fmul float undef, undef
; SLOWF32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f32sub = fsub float %f32_2, undef
; SLOWF32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f32c_2 = fmul contract float undef, undef
; SLOWF32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f32csub = fsub contract float %f32c_2, undef
; SLOWF32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f32_2 = fmul <2 x float> undef, undef
; SLOWF32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32sub = fsub <2 x float> %v2f32_2, undef
; SLOWF32-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; FASTF32-LABEL: 'fmul_fadd_f32'
; FASTF32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f32 = fmul float undef, undef
; FASTF32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f32add = fadd float %f32, undef
; FASTF32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f32c = fmul contract float undef, undef
; FASTF32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f32cadd = fadd contract float %f32c, undef
; FASTF32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32 = fmul <2 x float> undef, undef
; FASTF32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32add = fadd <2 x float> %v2f32, undef
; FASTF32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f32_2 = fmul float undef, undef
; FASTF32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f32sub = fsub float %f32_2, undef
; FASTF32-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f32c_2 = fmul contract float undef, undef
; FASTF32-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f32csub = fsub contract float %f32c_2, undef
; FASTF32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32_2 = fmul <2 x float> undef, undef
; FASTF32-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32sub = fsub <2 x float> %v2f32_2, undef
; FASTF32-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; SLOWF32-SIZE-LABEL: 'fmul_fadd_f32'
; SLOWF32-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f32 = fmul float undef, undef
; SLOWF32-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f32add = fadd float %f32, undef
; SLOWF32-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f32c = fmul contract float undef, undef
; SLOWF32-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f32cadd = fadd contract float %f32c, undef
; SLOWF32-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f32 = fmul <2 x float> undef, undef
; SLOWF32-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32add = fadd <2 x float> %v2f32, undef
; SLOWF32-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f32_2 = fmul float undef, undef
; SLOWF32-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f32sub = fsub float %f32_2, undef
; SLOWF32-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f32c_2 = fmul contract float undef, undef
; SLOWF32-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f32csub = fsub contract float %f32c_2, undef
; SLOWF32-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f32_2 = fmul <2 x float> undef, undef
; SLOWF32-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32sub = fsub <2 x float> %v2f32_2, undef
; SLOWF32-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
;
; FASTF32-SIZE-LABEL: 'fmul_fadd_f32'
; FASTF32-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f32 = fmul float undef, undef
; FASTF32-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f32add = fadd float %f32, undef
; FASTF32-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f32c = fmul contract float undef, undef
; FASTF32-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f32cadd = fadd contract float %f32c, undef
; FASTF32-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32 = fmul <2 x float> undef, undef
; FASTF32-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32add = fadd <2 x float> %v2f32, undef
; FASTF32-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f32_2 = fmul float undef, undef
; FASTF32-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f32sub = fsub float %f32_2, undef
; FASTF32-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f32c_2 = fmul contract float undef, undef
; FASTF32-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f32csub = fsub contract float %f32c_2, undef
; FASTF32-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32_2 = fmul <2 x float> undef, undef
; FASTF32-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v2f32sub = fsub <2 x float> %v2f32_2, undef
; FASTF32-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
;
%f32 = fmul float undef, undef
%f32add = fadd float %f32, undef
%f32c = fmul contract float undef, undef
%f32cadd = fadd contract float %f32c, undef
%v2f32 = fmul <2 x float> undef, undef
%v2f32add = fadd <2 x float> %v2f32, undef
%f32_2 = fmul float undef, undef
%f32sub = fsub float %f32_2, undef
%f32c_2 = fmul contract float undef, undef
%f32csub = fsub contract float %f32c_2, undef
%v2f32_2 = fmul <2 x float> undef, undef
%v2f32sub = fsub <2 x float> %v2f32_2, undef
ret void
}
define void @fmul_fadd_f16() #0 {
; FUSED-LABEL: 'fmul_fadd_f16'
; FUSED-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f16 = fmul half undef, undef
; FUSED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f16add = fadd half %f16, undef
; FUSED-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f16c = fmul contract half undef, undef
; FUSED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f15cadd = fadd contract half %f16c, undef
; FUSED-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f16 = fmul <2 x half> undef, undef
; FUSED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16add = fadd <2 x half> %v2f16, undef
; FUSED-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f16_2 = fmul half undef, undef
; FUSED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f16sub = fsub half %f16_2, undef
; FUSED-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f16c_2 = fmul contract half undef, undef
; FUSED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f15csub = fsub contract half %f16c_2, undef
; FUSED-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f16_2 = fmul <2 x half> undef, undef
; FUSED-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16sub = fsub <2 x half> %v2f16_2, undef
; FUSED-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; GFX9SLOW-LABEL: 'fmul_fadd_f16'
; GFX9SLOW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f16 = fmul half undef, undef
; GFX9SLOW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f16add = fadd half %f16, undef
; GFX9SLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f16c = fmul contract half undef, undef
; GFX9SLOW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f15cadd = fadd contract half %f16c, undef
; GFX9SLOW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16 = fmul <2 x half> undef, undef
; GFX9SLOW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16add = fadd <2 x half> %v2f16, undef
; GFX9SLOW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f16_2 = fmul half undef, undef
; GFX9SLOW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f16sub = fsub half %f16_2, undef
; GFX9SLOW-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f16c_2 = fmul contract half undef, undef
; GFX9SLOW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f15csub = fsub contract half %f16c_2, undef
; GFX9SLOW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_2 = fmul <2 x half> undef, undef
; GFX9SLOW-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16sub = fsub <2 x half> %v2f16_2, undef
; GFX9SLOW-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; FUSED-SIZE-LABEL: 'fmul_fadd_f16'
; FUSED-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f16 = fmul half undef, undef
; FUSED-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f16add = fadd half %f16, undef
; FUSED-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f16c = fmul contract half undef, undef
; FUSED-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f15cadd = fadd contract half %f16c, undef
; FUSED-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f16 = fmul <2 x half> undef, undef
; FUSED-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16add = fadd <2 x half> %v2f16, undef
; FUSED-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f16_2 = fmul half undef, undef
; FUSED-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f16sub = fsub half %f16_2, undef
; FUSED-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f16c_2 = fmul contract half undef, undef
; FUSED-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f15csub = fsub contract half %f16c_2, undef
; FUSED-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f16_2 = fmul <2 x half> undef, undef
; FUSED-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16sub = fsub <2 x half> %v2f16_2, undef
; FUSED-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
;
; GFX9SLOW-SIZE-LABEL: 'fmul_fadd_f16'
; GFX9SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f16 = fmul half undef, undef
; GFX9SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f16add = fadd half %f16, undef
; GFX9SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f16c = fmul contract half undef, undef
; GFX9SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f15cadd = fadd contract half %f16c, undef
; GFX9SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16 = fmul <2 x half> undef, undef
; GFX9SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16add = fadd <2 x half> %v2f16, undef
; GFX9SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f16_2 = fmul half undef, undef
; GFX9SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f16sub = fsub half %f16_2, undef
; GFX9SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f16c_2 = fmul contract half undef, undef
; GFX9SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f15csub = fsub contract half %f16c_2, undef
; GFX9SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16_2 = fmul <2 x half> undef, undef
; GFX9SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16sub = fsub <2 x half> %v2f16_2, undef
; GFX9SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
;
%f16 = fmul half undef, undef
%f16add = fadd half %f16, undef
%f16c = fmul contract half undef, undef
%f15cadd = fadd contract half %f16c, undef
%v2f16 = fmul <2 x half> undef, undef
%v2f16add = fadd <2 x half> %v2f16, undef
%f16_2 = fmul half undef, undef
%f16sub = fsub half %f16_2, undef
%f16c_2 = fmul contract half undef, undef
%f15csub = fsub contract half %f16c_2, undef
%v2f16_2 = fmul <2 x half> undef, undef
%v2f16sub = fsub <2 x half> %v2f16_2, undef
ret void
}
define void @fmul_fadd_f64() #0 {
; SLOWF64-LABEL: 'fmul_fadd_f64'
; SLOWF64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f64 = fmul double undef, undef
; SLOWF64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f64add = fadd double %f64, undef
; SLOWF64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f64c = fmul contract double undef, undef
; SLOWF64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f64cadd = fadd contract double %f64c, undef
; SLOWF64-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v2f64 = fmul <2 x double> undef, undef
; SLOWF64-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v2f64add = fadd <2 x double> %v2f64, undef
; SLOWF64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f64_2 = fmul double undef, undef
; SLOWF64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f64sub = fsub double %f64_2, undef
; SLOWF64-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f64c_2 = fmul contract double undef, undef
; SLOWF64-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f64csub = fsub contract double %f64c_2, undef
; SLOWF64-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v2f64_2 = fmul <2 x double> undef, undef
; SLOWF64-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v2f64sub = fsub <2 x double> %v2f64_2, undef
; SLOWF64-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; GFX9FAST-LABEL: 'fmul_fadd_f64'
; GFX9FAST-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f64 = fmul double undef, undef
; GFX9FAST-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f64add = fadd double %f64, undef
; GFX9FAST-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f64c = fmul contract double undef, undef
; GFX9FAST-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f64cadd = fadd contract double %f64c, undef
; GFX9FAST-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f64 = fmul <2 x double> undef, undef
; GFX9FAST-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v2f64add = fadd <2 x double> %v2f64, undef
; GFX9FAST-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f64_2 = fmul double undef, undef
; GFX9FAST-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f64sub = fsub double %f64_2, undef
; GFX9FAST-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f64c_2 = fmul contract double undef, undef
; GFX9FAST-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f64csub = fsub contract double %f64c_2, undef
; GFX9FAST-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f64_2 = fmul <2 x double> undef, undef
; GFX9FAST-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v2f64sub = fsub <2 x double> %v2f64_2, undef
; GFX9FAST-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void
;
; SLOWF64-SIZE-LABEL: 'fmul_fadd_f64'
; SLOWF64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f64 = fmul double undef, undef
; SLOWF64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f64add = fadd double %f64, undef
; SLOWF64-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f64c = fmul contract double undef, undef
; SLOWF64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f64cadd = fadd contract double %f64c, undef
; SLOWF64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f64 = fmul <2 x double> undef, undef
; SLOWF64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f64add = fadd <2 x double> %v2f64, undef
; SLOWF64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f64_2 = fmul double undef, undef
; SLOWF64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f64sub = fsub double %f64_2, undef
; SLOWF64-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f64c_2 = fmul contract double undef, undef
; SLOWF64-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f64csub = fsub contract double %f64c_2, undef
; SLOWF64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f64_2 = fmul <2 x double> undef, undef
; SLOWF64-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f64sub = fsub <2 x double> %v2f64_2, undef
; SLOWF64-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
;
; GFX9FAST-SIZE-LABEL: 'fmul_fadd_f64'
; GFX9FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f64 = fmul double undef, undef
; GFX9FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f64add = fadd double %f64, undef
; GFX9FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f64c = fmul contract double undef, undef
; GFX9FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f64cadd = fadd contract double %f64c, undef
; GFX9FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f64 = fmul <2 x double> undef, undef
; GFX9FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f64add = fadd <2 x double> %v2f64, undef
; GFX9FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f64_2 = fmul double undef, undef
; GFX9FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f64sub = fsub double %f64_2, undef
; GFX9FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %f64c_2 = fmul contract double undef, undef
; GFX9FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f64csub = fsub contract double %f64c_2, undef
; GFX9FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: %v2f64_2 = fmul <2 x double> undef, undef
; GFX9FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f64sub = fsub <2 x double> %v2f64_2, undef
; GFX9FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void
;
%f64 = fmul double undef, undef
%f64add = fadd double %f64, undef
%f64c = fmul contract double undef, undef
%f64cadd = fadd contract double %f64c, undef
%v2f64 = fmul <2 x double> undef, undef
%v2f64add = fadd <2 x double> %v2f64, undef
%f64_2 = fmul double undef, undef
%f64sub = fsub double %f64_2, undef
%f64c_2 = fmul contract double undef, undef
%f64csub = fsub contract double %f64c_2, undef
%v2f64_2 = fmul <2 x double> undef, undef
%v2f64sub = fsub <2 x double> %v2f64_2, undef
ret void
}
attributes #0 = { nounwind }
|