| ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 6 | |
| ; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgpu8.03-amd-amdhsa < %s | FileCheck -check-prefixes=ALL,GFX8 %s | |
| ; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgpu9.00-amd-amdhsa < %s | FileCheck -check-prefixes=ALL,GFX9 %s | |
| ; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgpu11.00-amd-amdhsa < %s | FileCheck -check-prefixes=ALL,GFX11 %s | |
| ; RUN: opt -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=amdgpu9.00-amd-amdhsa < %s | FileCheck -check-prefixes=ALL-SIZE %s | |
| ; RUN: opt -passes="print<cost-model>" -cost-kind=size-latency 2>&1 -disable-output -mtriple=amdgpu9.00-amd-amdhsa < %s | FileCheck -check-prefixes=ALL-SIZE-LATENCY %s | |
| define void @select_i32(i1 %cond, i32 %a, i32 %b) { | |
| ; ALL-LABEL: 'select_i32' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, i32 %a, i32 %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_i32' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, i32 %a, i32 %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_i32' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, i32 %a, i32 %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, i32 %a, i32 %b | |
| ret void | |
| } | |
| define void @select_i64(i1 %cond, i64 %a, i64 %b) { | |
| ; ALL-LABEL: 'select_i64' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, i64 %a, i64 %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_i64' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, i64 %a, i64 %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_i64' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, i64 %a, i64 %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, i64 %a, i64 %b | |
| ret void | |
| } | |
| define void @select_f32(i1 %cond, float %a, float %b) { | |
| ; ALL-LABEL: 'select_f32' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, float %a, float %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_f32' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, float %a, float %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_f32' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, float %a, float %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, float %a, float %b | |
| ret void | |
| } | |
| define void @select_f64(i1 %cond, double %a, double %b) { | |
| ; ALL-LABEL: 'select_f64' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, double %a, double %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_f64' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, double %a, double %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_f64' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, double %a, double %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, double %a, double %b | |
| ret void | |
| } | |
| define void @select_i16(i1 %cond, i16 %a, i16 %b) { | |
| ; ALL-LABEL: 'select_i16' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, i16 %a, i16 %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_i16' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, i16 %a, i16 %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_i16' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, i16 %a, i16 %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, i16 %a, i16 %b | |
| ret void | |
| } | |
| define void @select_f16(i1 %cond, half %a, half %b) { | |
| ; ALL-LABEL: 'select_f16' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, half %a, half %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_f16' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, half %a, half %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_f16' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, half %a, half %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, half %a, half %b | |
| ret void | |
| } | |
| define void @select_ptr(i1 %cond, ptr %a, ptr %b) { | |
| ; ALL-LABEL: 'select_ptr' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, ptr %a, ptr %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_ptr' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, ptr %a, ptr %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_ptr' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, ptr %a, ptr %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, ptr %a, ptr %b | |
| ret void | |
| } | |
| define void @select_v2i32(i1 %cond, <2 x i32> %a, <2 x i32> %b) { | |
| ; ALL-LABEL: 'select_v2i32' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <2 x i32> %a, <2 x i32> %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_v2i32' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <2 x i32> %a, <2 x i32> %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_v2i32' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <2 x i32> %a, <2 x i32> %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, <2 x i32> %a, <2 x i32> %b | |
| ret void | |
| } | |
| define void @select_v4i32(i1 %cond, <4 x i32> %a, <4 x i32> %b) { | |
| ; ALL-LABEL: 'select_v4i32' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %sel = select i1 %cond, <4 x i32> %a, <4 x i32> %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_v4i32' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %sel = select i1 %cond, <4 x i32> %a, <4 x i32> %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_v4i32' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <4 x i32> %a, <4 x i32> %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, <4 x i32> %a, <4 x i32> %b | |
| ret void | |
| } | |
| define void @select_v2i16(i1 %cond, <2 x i16> %a, <2 x i16> %b) { | |
| ; ALL-LABEL: 'select_v2i16' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <2 x i16> %a, <2 x i16> %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_v2i16' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <2 x i16> %a, <2 x i16> %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_v2i16' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <2 x i16> %a, <2 x i16> %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, <2 x i16> %a, <2 x i16> %b | |
| ret void | |
| } | |
| define void @select_v4i16(i1 %cond, <4 x i16> %a, <4 x i16> %b) { | |
| ; ALL-LABEL: 'select_v4i16' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <4 x i16> %a, <4 x i16> %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_v4i16' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <4 x i16> %a, <4 x i16> %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_v4i16' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <4 x i16> %a, <4 x i16> %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, <4 x i16> %a, <4 x i16> %b | |
| ret void | |
| } | |
| define void @select_v2f32(i1 %cond, <2 x float> %a, <2 x float> %b) { | |
| ; ALL-LABEL: 'select_v2f32' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <2 x float> %a, <2 x float> %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_v2f32' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <2 x float> %a, <2 x float> %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_v2f32' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <2 x float> %a, <2 x float> %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, <2 x float> %a, <2 x float> %b | |
| ret void | |
| } | |
| define void @select_v4f32(i1 %cond, <4 x float> %a, <4 x float> %b) { | |
| ; ALL-LABEL: 'select_v4f32' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <4 x float> %a, <4 x float> %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_v4f32' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <4 x float> %a, <4 x float> %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_v4f32' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <4 x float> %a, <4 x float> %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, <4 x float> %a, <4 x float> %b | |
| ret void | |
| } | |
| define void @select_v2f16(i1 %cond, <2 x half> %a, <2 x half> %b) { | |
| ; ALL-LABEL: 'select_v2f16' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <2 x half> %a, <2 x half> %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_v2f16' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <2 x half> %a, <2 x half> %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_v2f16' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <2 x half> %a, <2 x half> %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, <2 x half> %a, <2 x half> %b | |
| ret void | |
| } | |
| define void @select_v4f16(i1 %cond, <4 x half> %a, <4 x half> %b) { | |
| ; ALL-LABEL: 'select_v4f16' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <4 x half> %a, <4 x half> %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_v4f16' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <4 x half> %a, <4 x half> %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_v4f16' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <4 x half> %a, <4 x half> %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, <4 x half> %a, <4 x half> %b | |
| ret void | |
| } | |
| define void @select_v3i32(i1 %cond, <3 x i32> %a, <3 x i32> %b) { | |
| ; ALL-LABEL: 'select_v3i32' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %sel = select i1 %cond, <3 x i32> %a, <3 x i32> %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_v3i32' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %sel = select i1 %cond, <3 x i32> %a, <3 x i32> %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_v3i32' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <3 x i32> %a, <3 x i32> %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, <3 x i32> %a, <3 x i32> %b | |
| ret void | |
| } | |
| define void @select_v3f32(i1 %cond, <3 x float> %a, <3 x float> %b) { | |
| ; ALL-LABEL: 'select_v3f32' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <3 x float> %a, <3 x float> %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_v3f32' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <3 x float> %a, <3 x float> %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_v3f32' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <3 x float> %a, <3 x float> %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, <3 x float> %a, <3 x float> %b | |
| ret void | |
| } | |
| define void @select_v3i16(i1 %cond, <3 x i16> %a, <3 x i16> %b) { | |
| ; ALL-LABEL: 'select_v3i16' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <3 x i16> %a, <3 x i16> %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_v3i16' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <3 x i16> %a, <3 x i16> %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_v3i16' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <3 x i16> %a, <3 x i16> %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, <3 x i16> %a, <3 x i16> %b | |
| ret void | |
| } | |
| define void @select_v3f16(i1 %cond, <3 x half> %a, <3 x half> %b) { | |
| ; ALL-LABEL: 'select_v3f16' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <3 x half> %a, <3 x half> %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_v3f16' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <3 x half> %a, <3 x half> %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_v3f16' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <3 x half> %a, <3 x half> %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, <3 x half> %a, <3 x half> %b | |
| ret void | |
| } | |
| define void @select_v2ptr(i1 %cond, <2 x ptr> %a, <2 x ptr> %b) { | |
| ; ALL-LABEL: 'select_v2ptr' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sel = select i1 %cond, <2 x ptr> %a, <2 x ptr> %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_v2ptr' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %sel = select i1 %cond, <2 x ptr> %a, <2 x ptr> %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_v2ptr' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <2 x ptr> %a, <2 x ptr> %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, <2 x ptr> %a, <2 x ptr> %b | |
| ret void | |
| } | |
| define void @select_v4ptr(i1 %cond, <4 x ptr> %a, <4 x ptr> %b) { | |
| ; ALL-LABEL: 'select_v4ptr' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %sel = select i1 %cond, <4 x ptr> %a, <4 x ptr> %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'select_v4ptr' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %sel = select i1 %cond, <4 x ptr> %a, <4 x ptr> %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'select_v4ptr' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %sel = select i1 %cond, <4 x ptr> %a, <4 x ptr> %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %sel = select i1 %cond, <4 x ptr> %a, <4 x ptr> %b | |
| ret void | |
| } | |
| ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: | |
| ; GFX11: {{.*}} | |
| ; GFX8: {{.*}} | |
| ; GFX9: {{.*}} |