| ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --filter "instruction:.*(sitofp|uitofp|fptosi|fptoui)" | |
| ; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu6.01-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=ALL,GFX6 | |
| ; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu7.00-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=ALL,GFX6 | |
| ; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu8.03-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=ALL,GFX9-THROUGHPUT | |
| ; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu9.00-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=ALL,GFX9-THROUGHPUT | |
| ; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu9.00-amd-amdhsa -mattr=-gfx9-insts < %s 2>&1 | FileCheck %s --check-prefixes=ALL,GFX9-THROUGHPUT | |
| ; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu9.06-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=ALL,HALF | |
| ; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu9.42-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=ALL,FULL | |
| ; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu9.50-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=ALL,FULL | |
| ; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu11.00-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=ALL,GFX9-THROUGHPUT | |
| ; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu11.00-amd-amdhsa -mattr=-16-bit-insts < %s 2>&1 | FileCheck %s --check-prefixes=ALL,GFX6 | |
| ; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu12.50-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=ALL,GFX9-THROUGHPUT | |
| ; RUN: opt -passes="print<cost-model>" -cost-kind=code-size -disable-output -mtriple=amdgpu6.01-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=ALL,GFX6 | |
| ; RUN: opt -passes="print<cost-model>" -cost-kind=code-size -disable-output -mtriple=amdgpu9.00-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=ALL,HALF | |
| ; RUN: opt -passes="print<cost-model>" -cost-kind=code-size -disable-output -mtriple=amdgpu9.42-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=ALL,FULL | |
| ; RUN: opt -passes="print<cost-model>" -cost-kind=code-size -disable-output -mtriple=amdgpu9.50-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=ALL,FULL | |
| ; RUN: opt -passes="print<cost-model>" -cost-kind=code-size -disable-output -mtriple=amdgpu12.50-amd-amdhsa < %s 2>&1 | FileCheck %s --check-prefixes=ALL,HALF | |
| ; Half fits in i32. Bfloat must extend to f32 and use the full i64 expansion. | |
| define void @bf16_to_i64(bfloat %a, <2 x bfloat> %b, half %h) { | |
| ; ALL-LABEL: 'bf16_to_i64' | |
| ; ALL: Cost Model: Found an estimated cost of 1 for instruction: %s = fptosi bfloat %a to i64 | |
| ; ALL: Cost Model: Found an estimated cost of 1 for instruction: %u = fptoui bfloat %a to i64 | |
| ; ALL: Cost Model: Found an estimated cost of 2 for instruction: %vs = fptosi <2 x bfloat> %b to <2 x i64> | |
| ; ALL: Cost Model: Found an estimated cost of 2 for instruction: %vu = fptoui <2 x bfloat> %b to <2 x i64> | |
| ; ALL: Cost Model: Found an estimated cost of 1 for instruction: %hs = fptosi half %h to i64 | |
| ; ALL: Cost Model: Found an estimated cost of 1 for instruction: %hu = fptoui half %h to i64 | |
| ; | |
| %s = fptosi bfloat %a to i64 | |
| %u = fptoui bfloat %a to i64 | |
| %vs = fptosi <2 x bfloat> %b to <2 x i64> | |
| %vu = fptoui <2 x bfloat> %b to <2 x i64> | |
| %hs = fptosi half %h to i64 | |
| %hu = fptoui half %h to i64 | |
| ret void | |
| } | |
| ; Conversion to bf16 goes through f32 and rounds the result when there are | |
| ; 16 bit instructions. Native rounding packs pairs, including the final | |
| ; unpaired element of an odd-sized vector. | |
| define void @i64_to_bf16(i64 %a, <2 x i64> %b, <3 x i64> %c, i48 %d) { | |
| ; GFX6-LABEL: 'i64_to_bf16' | |
| ; GFX6: Cost Model: Found an estimated cost of 1 for instruction: %s = sitofp i64 %a to bfloat | |
| ; GFX6: Cost Model: Found an estimated cost of 1 for instruction: %u = uitofp i64 %a to bfloat | |
| ; GFX6: Cost Model: Found an estimated cost of 2 for instruction: %vs = sitofp <2 x i64> %b to <2 x bfloat> | |
| ; GFX6: Cost Model: Found an estimated cost of 2 for instruction: %vu = uitofp <2 x i64> %b to <2 x bfloat> | |
| ; GFX6: Cost Model: Found an estimated cost of 9 for instruction: %v3s = sitofp <3 x i64> %c to <3 x bfloat> | |
| ; GFX6: Cost Model: Found an estimated cost of 9 for instruction: %v3u = uitofp <3 x i64> %c to <3 x bfloat> | |
| ; GFX6: Cost Model: Found an estimated cost of 1 for instruction: %s48 = sitofp i48 %d to bfloat | |
| ; GFX6: Cost Model: Found an estimated cost of 1 for instruction: %u48 = uitofp i48 %d to bfloat | |
| ; | |
| ; GFX9-THROUGHPUT-LABEL: 'i64_to_bf16' | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 1 for instruction: %s = sitofp i64 %a to bfloat | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 1 for instruction: %u = uitofp i64 %a to bfloat | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 4 for instruction: %vs = sitofp <2 x i64> %b to <2 x bfloat> | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 4 for instruction: %vu = uitofp <2 x i64> %b to <2 x bfloat> | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 7 for instruction: %v3s = sitofp <3 x i64> %c to <3 x bfloat> | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 7 for instruction: %v3u = uitofp <3 x i64> %c to <3 x bfloat> | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 1 for instruction: %s48 = sitofp i48 %d to bfloat | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 1 for instruction: %u48 = uitofp i48 %d to bfloat | |
| ; | |
| ; HALF-LABEL: 'i64_to_bf16' | |
| ; HALF: Cost Model: Found an estimated cost of 1 for instruction: %s = sitofp i64 %a to bfloat | |
| ; HALF: Cost Model: Found an estimated cost of 1 for instruction: %u = uitofp i64 %a to bfloat | |
| ; HALF: Cost Model: Found an estimated cost of 4 for instruction: %vs = sitofp <2 x i64> %b to <2 x bfloat> | |
| ; HALF: Cost Model: Found an estimated cost of 4 for instruction: %vu = uitofp <2 x i64> %b to <2 x bfloat> | |
| ; HALF: Cost Model: Found an estimated cost of 7 for instruction: %v3s = sitofp <3 x i64> %c to <3 x bfloat> | |
| ; HALF: Cost Model: Found an estimated cost of 7 for instruction: %v3u = uitofp <3 x i64> %c to <3 x bfloat> | |
| ; HALF: Cost Model: Found an estimated cost of 1 for instruction: %s48 = sitofp i48 %d to bfloat | |
| ; HALF: Cost Model: Found an estimated cost of 1 for instruction: %u48 = uitofp i48 %d to bfloat | |
| ; | |
| ; FULL-LABEL: 'i64_to_bf16' | |
| ; FULL: Cost Model: Found an estimated cost of 1 for instruction: %s = sitofp i64 %a to bfloat | |
| ; FULL: Cost Model: Found an estimated cost of 1 for instruction: %u = uitofp i64 %a to bfloat | |
| ; FULL: Cost Model: Found an estimated cost of 4 for instruction: %vs = sitofp <2 x i64> %b to <2 x bfloat> | |
| ; FULL: Cost Model: Found an estimated cost of 4 for instruction: %vu = uitofp <2 x i64> %b to <2 x bfloat> | |
| ; FULL: Cost Model: Found an estimated cost of 7 for instruction: %v3s = sitofp <3 x i64> %c to <3 x bfloat> | |
| ; FULL: Cost Model: Found an estimated cost of 7 for instruction: %v3u = uitofp <3 x i64> %c to <3 x bfloat> | |
| ; FULL: Cost Model: Found an estimated cost of 1 for instruction: %s48 = sitofp i48 %d to bfloat | |
| ; FULL: Cost Model: Found an estimated cost of 1 for instruction: %u48 = uitofp i48 %d to bfloat | |
| ; | |
| %s = sitofp i64 %a to bfloat | |
| %u = uitofp i64 %a to bfloat | |
| %vs = sitofp <2 x i64> %b to <2 x bfloat> | |
| %vu = uitofp <2 x i64> %b to <2 x bfloat> | |
| %v3s = sitofp <3 x i64> %c to <3 x bfloat> | |
| %v3u = uitofp <3 x i64> %c to <3 x bfloat> | |
| %s48 = sitofp i48 %d to bfloat | |
| %u48 = uitofp i48 %d to bfloat | |
| ret void | |
| } | |
| ; Subword extraction and bf16 rounding are independent costs. Native packed | |
| ; rounding still needs one integer-to-f32 conversion for each input lane. | |
| define void @narrow_to_bf16(<4 x i8> %a, <2 x i16> %b, <3 x i32> %c) { | |
| ; GFX6-LABEL: 'narrow_to_bf16' | |
| ; GFX6: Cost Model: Found an estimated cost of 4 for instruction: %bs = sitofp <4 x i8> %a to <4 x bfloat> | |
| ; GFX6: Cost Model: Found an estimated cost of 4 for instruction: %bu = uitofp <4 x i8> %a to <4 x bfloat> | |
| ; GFX6: Cost Model: Found an estimated cost of 2 for instruction: %hs = sitofp <2 x i16> %b to <2 x bfloat> | |
| ; GFX6: Cost Model: Found an estimated cost of 2 for instruction: %hu = uitofp <2 x i16> %b to <2 x bfloat> | |
| ; GFX6: Cost Model: Found an estimated cost of 9 for instruction: %ws = sitofp <3 x i32> %c to <3 x bfloat> | |
| ; GFX6: Cost Model: Found an estimated cost of 9 for instruction: %wu = uitofp <3 x i32> %c to <3 x bfloat> | |
| ; | |
| ; GFX9-THROUGHPUT-LABEL: 'narrow_to_bf16' | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 4 for instruction: %bs = sitofp <4 x i8> %a to <4 x bfloat> | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 4 for instruction: %bu = uitofp <4 x i8> %a to <4 x bfloat> | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 4 for instruction: %hs = sitofp <2 x i16> %b to <2 x bfloat> | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 4 for instruction: %hu = uitofp <2 x i16> %b to <2 x bfloat> | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 7 for instruction: %ws = sitofp <3 x i32> %c to <3 x bfloat> | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 7 for instruction: %wu = uitofp <3 x i32> %c to <3 x bfloat> | |
| ; | |
| ; HALF-LABEL: 'narrow_to_bf16' | |
| ; HALF: Cost Model: Found an estimated cost of 4 for instruction: %bs = sitofp <4 x i8> %a to <4 x bfloat> | |
| ; HALF: Cost Model: Found an estimated cost of 4 for instruction: %bu = uitofp <4 x i8> %a to <4 x bfloat> | |
| ; HALF: Cost Model: Found an estimated cost of 4 for instruction: %hs = sitofp <2 x i16> %b to <2 x bfloat> | |
| ; HALF: Cost Model: Found an estimated cost of 4 for instruction: %hu = uitofp <2 x i16> %b to <2 x bfloat> | |
| ; HALF: Cost Model: Found an estimated cost of 7 for instruction: %ws = sitofp <3 x i32> %c to <3 x bfloat> | |
| ; HALF: Cost Model: Found an estimated cost of 7 for instruction: %wu = uitofp <3 x i32> %c to <3 x bfloat> | |
| ; | |
| ; FULL-LABEL: 'narrow_to_bf16' | |
| ; FULL: Cost Model: Found an estimated cost of 4 for instruction: %bs = sitofp <4 x i8> %a to <4 x bfloat> | |
| ; FULL: Cost Model: Found an estimated cost of 4 for instruction: %bu = uitofp <4 x i8> %a to <4 x bfloat> | |
| ; FULL: Cost Model: Found an estimated cost of 4 for instruction: %hs = sitofp <2 x i16> %b to <2 x bfloat> | |
| ; FULL: Cost Model: Found an estimated cost of 4 for instruction: %hu = uitofp <2 x i16> %b to <2 x bfloat> | |
| ; FULL: Cost Model: Found an estimated cost of 7 for instruction: %ws = sitofp <3 x i32> %c to <3 x bfloat> | |
| ; FULL: Cost Model: Found an estimated cost of 7 for instruction: %wu = uitofp <3 x i32> %c to <3 x bfloat> | |
| ; | |
| %bs = sitofp <4 x i8> %a to <4 x bfloat> | |
| %bu = uitofp <4 x i8> %a to <4 x bfloat> | |
| %hs = sitofp <2 x i16> %b to <2 x bfloat> | |
| %hu = uitofp <2 x i16> %b to <2 x bfloat> | |
| %ws = sitofp <3 x i32> %c to <3 x bfloat> | |
| %wu = uitofp <3 x i32> %c to <3 x bfloat> | |
| ret void | |
| } | |
| ; Unsigned lanes wider than a byte are zero extended before the conversion. | |
| define void @narrow_unsigned_lanes(<4 x i12> %a) { | |
| ; GFX6-LABEL: 'narrow_unsigned_lanes' | |
| ; GFX6: Cost Model: Found an estimated cost of 1 for instruction: %u = uitofp <4 x i12> %a to <4 x float> | |
| ; GFX6: Cost Model: Found an estimated cost of 4 for instruction: %uh = uitofp <4 x i12> %a to <4 x half> | |
| ; | |
| ; GFX9-THROUGHPUT-LABEL: 'narrow_unsigned_lanes' | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 1 for instruction: %u = uitofp <4 x i12> %a to <4 x float> | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 10 for instruction: %uh = uitofp <4 x i12> %a to <4 x half> | |
| ; | |
| ; HALF-LABEL: 'narrow_unsigned_lanes' | |
| ; HALF: Cost Model: Found an estimated cost of 1 for instruction: %u = uitofp <4 x i12> %a to <4 x float> | |
| ; HALF: Cost Model: Found an estimated cost of 10 for instruction: %uh = uitofp <4 x i12> %a to <4 x half> | |
| ; | |
| ; FULL-LABEL: 'narrow_unsigned_lanes' | |
| ; FULL: Cost Model: Found an estimated cost of 1 for instruction: %u = uitofp <4 x i12> %a to <4 x float> | |
| ; FULL: Cost Model: Found an estimated cost of 10 for instruction: %uh = uitofp <4 x i12> %a to <4 x half> | |
| ; | |
| %u = uitofp <4 x i12> %a to <4 x float> | |
| %uh = uitofp <4 x i12> %a to <4 x half> | |
| ret void | |
| } | |
| ; FP64 rates vary independently of native trunc/floor support and code size. | |
| define void @i64_double(i64 %a, <2 x i64> %b, double %c, <2 x double> %d, i48 %e) { | |
| ; ALL-LABEL: 'i64_double' | |
| ; ALL: Cost Model: Found an estimated cost of 1 for instruction: %s = sitofp i64 %a to double | |
| ; ALL: Cost Model: Found an estimated cost of 1 for instruction: %u = uitofp i64 %a to double | |
| ; ALL: Cost Model: Found an estimated cost of 2 for instruction: %vs = sitofp <2 x i64> %b to <2 x double> | |
| ; ALL: Cost Model: Found an estimated cost of 2 for instruction: %vu = uitofp <2 x i64> %b to <2 x double> | |
| ; ALL: Cost Model: Found an estimated cost of 1 for instruction: %rs = fptosi double %c to i64 | |
| ; ALL: Cost Model: Found an estimated cost of 1 for instruction: %ru = fptoui double %c to i64 | |
| ; ALL: Cost Model: Found an estimated cost of 2 for instruction: %rvs = fptosi <2 x double> %d to <2 x i64> | |
| ; ALL: Cost Model: Found an estimated cost of 2 for instruction: %rvu = fptoui <2 x double> %d to <2 x i64> | |
| ; ALL: Cost Model: Found an estimated cost of 1 for instruction: %s48 = sitofp i48 %e to double | |
| ; ALL: Cost Model: Found an estimated cost of 1 for instruction: %u48 = uitofp i48 %e to double | |
| ; ALL: Cost Model: Found an estimated cost of 1 for instruction: %ru48 = fptoui double %c to i48 | |
| ; | |
| %s = sitofp i64 %a to double | |
| %u = uitofp i64 %a to double | |
| %vs = sitofp <2 x i64> %b to <2 x double> | |
| %vu = uitofp <2 x i64> %b to <2 x double> | |
| %rs = fptosi double %c to i64 | |
| %ru = fptoui double %c to i64 | |
| %rvs = fptosi <2 x double> %d to <2 x i64> | |
| %rvu = fptoui <2 x double> %d to <2 x i64> | |
| %s48 = sitofp i48 %e to double | |
| %u48 = uitofp i48 %e to double | |
| %ru48 = fptoui double %c to i48 | |
| ret void | |
| } | |
| ; Integers of 33 to 63 bits are converted through i64. | |
| define void @i48(i48 %a, float %b, bfloat %c) { | |
| ; ALL-LABEL: 'i48' | |
| ; ALL: Cost Model: Found an estimated cost of 1 for instruction: %s = sitofp i48 %a to float | |
| ; ALL: Cost Model: Found an estimated cost of 1 for instruction: %u = uitofp i48 %a to float | |
| ; ALL: Cost Model: Found an estimated cost of 1 for instruction: %rs = fptosi float %b to i48 | |
| ; ALL: Cost Model: Found an estimated cost of 1 for instruction: %ru = fptoui float %b to i48 | |
| ; ALL: Cost Model: Found an estimated cost of 1 for instruction: %bu = fptoui bfloat %c to i48 | |
| ; | |
| %s = sitofp i48 %a to float | |
| %u = uitofp i48 %a to float | |
| %rs = fptosi float %b to i48 | |
| %ru = fptoui float %b to i48 | |
| %bu = fptoui bfloat %c to i48 | |
| ret void | |
| } | |
| ; i128 and fp128 casts keep the generic estimates. | |
| define void @other_widths(i128 %a, double %b, <2 x i128> %c, <2 x double> %d, fp128 %e, i64 %f) { | |
| ; GFX6-LABEL: 'other_widths' | |
| ; GFX6: Cost Model: Found an estimated cost of 1 for instruction: %s = sitofp i128 %a to double | |
| ; GFX6: Cost Model: Found an estimated cost of 1 for instruction: %u = uitofp i128 %a to bfloat | |
| ; GFX6: Cost Model: Found an estimated cost of 2 for instruction: %vs = sitofp <2 x i128> %c to <2 x double> | |
| ; GFX6: Cost Model: Found an estimated cost of 6 for instruction: %vu = uitofp <2 x i128> %c to <2 x bfloat> | |
| ; GFX6: Cost Model: Found an estimated cost of 1 for instruction: %rs = fptosi double %b to i128 | |
| ; GFX6: Cost Model: Found an estimated cost of 1 for instruction: %ru = fptoui double %b to i128 | |
| ; GFX6: Cost Model: Found an estimated cost of 2 for instruction: %rvs = fptosi <2 x double> %d to <2 x i128> | |
| ; GFX6: Cost Model: Found an estimated cost of 2 for instruction: %rvu = fptoui <2 x double> %d to <2 x i128> | |
| ; GFX6: Cost Model: Found an estimated cost of 1 for instruction: %qs = fptosi fp128 %e to i64 | |
| ; GFX6: Cost Model: Found an estimated cost of 1 for instruction: %qu = fptoui fp128 %e to i64 | |
| ; GFX6: Cost Model: Found an estimated cost of 1 for instruction: %rqs = sitofp i64 %f to fp128 | |
| ; GFX6: Cost Model: Found an estimated cost of 1 for instruction: %rqu = uitofp i64 %f to fp128 | |
| ; | |
| ; GFX9-THROUGHPUT-LABEL: 'other_widths' | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 1 for instruction: %s = sitofp i128 %a to double | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 1 for instruction: %u = uitofp i128 %a to bfloat | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 2 for instruction: %vs = sitofp <2 x i128> %c to <2 x double> | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 2 for instruction: %vu = uitofp <2 x i128> %c to <2 x bfloat> | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 1 for instruction: %rs = fptosi double %b to i128 | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 1 for instruction: %ru = fptoui double %b to i128 | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 2 for instruction: %rvs = fptosi <2 x double> %d to <2 x i128> | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 2 for instruction: %rvu = fptoui <2 x double> %d to <2 x i128> | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 1 for instruction: %qs = fptosi fp128 %e to i64 | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 1 for instruction: %qu = fptoui fp128 %e to i64 | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 1 for instruction: %rqs = sitofp i64 %f to fp128 | |
| ; GFX9-THROUGHPUT: Cost Model: Found an estimated cost of 1 for instruction: %rqu = uitofp i64 %f to fp128 | |
| ; | |
| ; HALF-LABEL: 'other_widths' | |
| ; HALF: Cost Model: Found an estimated cost of 1 for instruction: %s = sitofp i128 %a to double | |
| ; HALF: Cost Model: Found an estimated cost of 1 for instruction: %u = uitofp i128 %a to bfloat | |
| ; HALF: Cost Model: Found an estimated cost of 2 for instruction: %vs = sitofp <2 x i128> %c to <2 x double> | |
| ; HALF: Cost Model: Found an estimated cost of 2 for instruction: %vu = uitofp <2 x i128> %c to <2 x bfloat> | |
| ; HALF: Cost Model: Found an estimated cost of 1 for instruction: %rs = fptosi double %b to i128 | |
| ; HALF: Cost Model: Found an estimated cost of 1 for instruction: %ru = fptoui double %b to i128 | |
| ; HALF: Cost Model: Found an estimated cost of 2 for instruction: %rvs = fptosi <2 x double> %d to <2 x i128> | |
| ; HALF: Cost Model: Found an estimated cost of 2 for instruction: %rvu = fptoui <2 x double> %d to <2 x i128> | |
| ; HALF: Cost Model: Found an estimated cost of 1 for instruction: %qs = fptosi fp128 %e to i64 | |
| ; HALF: Cost Model: Found an estimated cost of 1 for instruction: %qu = fptoui fp128 %e to i64 | |
| ; HALF: Cost Model: Found an estimated cost of 1 for instruction: %rqs = sitofp i64 %f to fp128 | |
| ; HALF: Cost Model: Found an estimated cost of 1 for instruction: %rqu = uitofp i64 %f to fp128 | |
| ; | |
| ; FULL-LABEL: 'other_widths' | |
| ; FULL: Cost Model: Found an estimated cost of 1 for instruction: %s = sitofp i128 %a to double | |
| ; FULL: Cost Model: Found an estimated cost of 1 for instruction: %u = uitofp i128 %a to bfloat | |
| ; FULL: Cost Model: Found an estimated cost of 2 for instruction: %vs = sitofp <2 x i128> %c to <2 x double> | |
| ; FULL: Cost Model: Found an estimated cost of 2 for instruction: %vu = uitofp <2 x i128> %c to <2 x bfloat> | |
| ; FULL: Cost Model: Found an estimated cost of 1 for instruction: %rs = fptosi double %b to i128 | |
| ; FULL: Cost Model: Found an estimated cost of 1 for instruction: %ru = fptoui double %b to i128 | |
| ; FULL: Cost Model: Found an estimated cost of 2 for instruction: %rvs = fptosi <2 x double> %d to <2 x i128> | |
| ; FULL: Cost Model: Found an estimated cost of 2 for instruction: %rvu = fptoui <2 x double> %d to <2 x i128> | |
| ; FULL: Cost Model: Found an estimated cost of 1 for instruction: %qs = fptosi fp128 %e to i64 | |
| ; FULL: Cost Model: Found an estimated cost of 1 for instruction: %qu = fptoui fp128 %e to i64 | |
| ; FULL: Cost Model: Found an estimated cost of 1 for instruction: %rqs = sitofp i64 %f to fp128 | |
| ; FULL: Cost Model: Found an estimated cost of 1 for instruction: %rqu = uitofp i64 %f to fp128 | |
| ; | |
| %s = sitofp i128 %a to double | |
| %u = uitofp i128 %a to bfloat | |
| %vs = sitofp <2 x i128> %c to <2 x double> | |
| %vu = uitofp <2 x i128> %c to <2 x bfloat> | |
| %rs = fptosi double %b to i128 | |
| %ru = fptoui double %b to i128 | |
| %rvs = fptosi <2 x double> %d to <2 x i128> | |
| %rvu = fptoui <2 x double> %d to <2 x i128> | |
| %qs = fptosi fp128 %e to i64 | |
| %qu = fptoui fp128 %e to i64 | |
| %rqs = sitofp i64 %f to fp128 | |
| %rqu = uitofp i64 %f to fp128 | |
| ret void | |
| } |