| ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 6 | |
| ; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu8.03-amd-amdhsa < %s 2>&1 | FileCheck -check-prefixes=ALL,GFX8 %s | |
| ; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu9.00-amd-amdhsa < %s 2>&1 | FileCheck -check-prefixes=ALL,GFX9 %s | |
| ; RUN: opt -passes="print<cost-model>" -disable-output -mtriple=amdgpu11.00-amd-amdhsa < %s 2>&1 | FileCheck -check-prefixes=ALL,GFX11 %s | |
| ; RUN: opt -passes="print<cost-model>" -cost-kind=code-size -disable-output -mtriple=amdgpu9.00-amd-amdhsa < %s 2>&1 | FileCheck -check-prefixes=ALL-SIZE %s | |
| ; RUN: opt -passes="print<cost-model>" -cost-kind=size-latency -disable-output -mtriple=amdgpu9.00-amd-amdhsa < %s 2>&1 | FileCheck -check-prefixes=ALL-SIZE-LATENCY %s | |
| define void @icmp_i32(i32 %a, i32 %b) { | |
| ; ALL-LABEL: 'icmp_i32' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_eq = icmp eq i32 %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_ne = icmp ne i32 %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_slt = icmp slt i32 %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_sge = icmp sge i32 %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'icmp_i32' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_eq = icmp eq i32 %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_ne = icmp ne i32 %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_slt = icmp slt i32 %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_sge = icmp sge i32 %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'icmp_i32' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_eq = icmp eq i32 %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_ne = icmp ne i32 %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_slt = icmp slt i32 %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_sge = icmp sge i32 %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %cmp_eq = icmp eq i32 %a, %b | |
| %cmp_ne = icmp ne i32 %a, %b | |
| %cmp_slt = icmp slt i32 %a, %b | |
| %cmp_sge = icmp sge i32 %a, %b | |
| ret void | |
| } | |
| define void @icmp_i64(i64 %a, i64 %b) { | |
| ; ALL-LABEL: 'icmp_i64' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_eq = icmp eq i64 %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_slt = icmp slt i64 %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'icmp_i64' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_eq = icmp eq i64 %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_slt = icmp slt i64 %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'icmp_i64' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_eq = icmp eq i64 %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_slt = icmp slt i64 %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %cmp_eq = icmp eq i64 %a, %b | |
| %cmp_slt = icmp slt i64 %a, %b | |
| ret void | |
| } | |
| define void @icmp_i16(i16 %a, i16 %b) { | |
| ; ALL-LABEL: 'icmp_i16' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_eq = icmp eq i16 %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_slt = icmp slt i16 %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'icmp_i16' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_eq = icmp eq i16 %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_slt = icmp slt i16 %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'icmp_i16' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_eq = icmp eq i16 %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_slt = icmp slt i16 %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %cmp_eq = icmp eq i16 %a, %b | |
| %cmp_slt = icmp slt i16 %a, %b | |
| ret void | |
| } | |
| define void @fcmp_f32(float %a, float %b) { | |
| ; ALL-LABEL: 'fcmp_f32' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_oeq = fcmp oeq float %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_one = fcmp one float %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_olt = fcmp olt float %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_oge = fcmp oge float %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'fcmp_f32' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_oeq = fcmp oeq float %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_one = fcmp one float %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_olt = fcmp olt float %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_oge = fcmp oge float %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'fcmp_f32' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_oeq = fcmp oeq float %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_one = fcmp one float %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_olt = fcmp olt float %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_oge = fcmp oge float %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %cmp_oeq = fcmp oeq float %a, %b | |
| %cmp_one = fcmp one float %a, %b | |
| %cmp_olt = fcmp olt float %a, %b | |
| %cmp_oge = fcmp oge float %a, %b | |
| ret void | |
| } | |
| define void @fcmp_f64(double %a, double %b) { | |
| ; ALL-LABEL: 'fcmp_f64' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_oeq = fcmp oeq double %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_olt = fcmp olt double %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'fcmp_f64' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_oeq = fcmp oeq double %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_olt = fcmp olt double %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'fcmp_f64' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_oeq = fcmp oeq double %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_olt = fcmp olt double %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %cmp_oeq = fcmp oeq double %a, %b | |
| %cmp_olt = fcmp olt double %a, %b | |
| ret void | |
| } | |
| define void @fcmp_f16(half %a, half %b) { | |
| ; ALL-LABEL: 'fcmp_f16' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_oeq = fcmp oeq half %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_olt = fcmp olt half %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'fcmp_f16' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_oeq = fcmp oeq half %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_olt = fcmp olt half %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'fcmp_f16' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_oeq = fcmp oeq half %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_olt = fcmp olt half %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %cmp_oeq = fcmp oeq half %a, %b | |
| %cmp_olt = fcmp olt half %a, %b | |
| ret void | |
| } | |
| define void @icmp_v2i32(<2 x i32> %a, <2 x i32> %b) { | |
| ; ALL-LABEL: 'icmp_v2i32' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cmp_eq = icmp eq <2 x i32> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cmp_slt = icmp slt <2 x i32> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'icmp_v2i32' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cmp_eq = icmp eq <2 x i32> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cmp_slt = icmp slt <2 x i32> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'icmp_v2i32' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_eq = icmp eq <2 x i32> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_slt = icmp slt <2 x i32> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %cmp_eq = icmp eq <2 x i32> %a, %b | |
| %cmp_slt = icmp slt <2 x i32> %a, %b | |
| ret void | |
| } | |
| define void @icmp_v3i32(<3 x i32> %a, <3 x i32> %b) { | |
| ; ALL-LABEL: 'icmp_v3i32' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cmp_eq = icmp eq <3 x i32> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cmp_slt = icmp slt <3 x i32> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'icmp_v3i32' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cmp_eq = icmp eq <3 x i32> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cmp_slt = icmp slt <3 x i32> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'icmp_v3i32' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_eq = icmp eq <3 x i32> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_slt = icmp slt <3 x i32> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %cmp_eq = icmp eq <3 x i32> %a, %b | |
| %cmp_slt = icmp slt <3 x i32> %a, %b | |
| ret void | |
| } | |
| define void @icmp_v4i32(<4 x i32> %a, <4 x i32> %b) { | |
| ; ALL-LABEL: 'icmp_v4i32' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cmp_eq = icmp eq <4 x i32> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cmp_slt = icmp slt <4 x i32> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'icmp_v4i32' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cmp_eq = icmp eq <4 x i32> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cmp_slt = icmp slt <4 x i32> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'icmp_v4i32' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_eq = icmp eq <4 x i32> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_slt = icmp slt <4 x i32> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %cmp_eq = icmp eq <4 x i32> %a, %b | |
| %cmp_slt = icmp slt <4 x i32> %a, %b | |
| ret void | |
| } | |
| define void @icmp_v2i16(<2 x i16> %a, <2 x i16> %b) { | |
| ; ALL-LABEL: 'icmp_v2i16' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cmp_eq = icmp eq <2 x i16> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cmp_slt = icmp slt <2 x i16> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'icmp_v2i16' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cmp_eq = icmp eq <2 x i16> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cmp_slt = icmp slt <2 x i16> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'icmp_v2i16' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_eq = icmp eq <2 x i16> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_slt = icmp slt <2 x i16> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %cmp_eq = icmp eq <2 x i16> %a, %b | |
| %cmp_slt = icmp slt <2 x i16> %a, %b | |
| ret void | |
| } | |
| define void @icmp_v3i16(<3 x i16> %a, <3 x i16> %b) { | |
| ; ALL-LABEL: 'icmp_v3i16' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cmp_eq = icmp eq <3 x i16> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cmp_slt = icmp slt <3 x i16> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'icmp_v3i16' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cmp_eq = icmp eq <3 x i16> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cmp_slt = icmp slt <3 x i16> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'icmp_v3i16' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_eq = icmp eq <3 x i16> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_slt = icmp slt <3 x i16> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %cmp_eq = icmp eq <3 x i16> %a, %b | |
| %cmp_slt = icmp slt <3 x i16> %a, %b | |
| ret void | |
| } | |
| define void @icmp_v4i16(<4 x i16> %a, <4 x i16> %b) { | |
| ; ALL-LABEL: 'icmp_v4i16' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cmp_eq = icmp eq <4 x i16> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cmp_slt = icmp slt <4 x i16> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'icmp_v4i16' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cmp_eq = icmp eq <4 x i16> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cmp_slt = icmp slt <4 x i16> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'icmp_v4i16' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_eq = icmp eq <4 x i16> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_slt = icmp slt <4 x i16> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %cmp_eq = icmp eq <4 x i16> %a, %b | |
| %cmp_slt = icmp slt <4 x i16> %a, %b | |
| ret void | |
| } | |
| define void @fcmp_v2f32(<2 x float> %a, <2 x float> %b) { | |
| ; ALL-LABEL: 'fcmp_v2f32' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cmp_oeq = fcmp oeq <2 x float> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cmp_olt = fcmp olt <2 x float> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'fcmp_v2f32' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cmp_oeq = fcmp oeq <2 x float> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cmp_olt = fcmp olt <2 x float> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'fcmp_v2f32' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_oeq = fcmp oeq <2 x float> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_olt = fcmp olt <2 x float> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %cmp_oeq = fcmp oeq <2 x float> %a, %b | |
| %cmp_olt = fcmp olt <2 x float> %a, %b | |
| ret void | |
| } | |
| define void @fcmp_v3f32(<3 x float> %a, <3 x float> %b) { | |
| ; ALL-LABEL: 'fcmp_v3f32' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cmp_oeq = fcmp oeq <3 x float> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cmp_olt = fcmp olt <3 x float> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'fcmp_v3f32' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cmp_oeq = fcmp oeq <3 x float> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cmp_olt = fcmp olt <3 x float> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'fcmp_v3f32' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_oeq = fcmp oeq <3 x float> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_olt = fcmp olt <3 x float> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %cmp_oeq = fcmp oeq <3 x float> %a, %b | |
| %cmp_olt = fcmp olt <3 x float> %a, %b | |
| ret void | |
| } | |
| define void @fcmp_v4f32(<4 x float> %a, <4 x float> %b) { | |
| ; ALL-LABEL: 'fcmp_v4f32' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cmp_oeq = fcmp oeq <4 x float> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cmp_olt = fcmp olt <4 x float> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'fcmp_v4f32' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cmp_oeq = fcmp oeq <4 x float> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cmp_olt = fcmp olt <4 x float> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'fcmp_v4f32' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_oeq = fcmp oeq <4 x float> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_olt = fcmp olt <4 x float> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %cmp_oeq = fcmp oeq <4 x float> %a, %b | |
| %cmp_olt = fcmp olt <4 x float> %a, %b | |
| ret void | |
| } | |
| define void @fcmp_v2f16(<2 x half> %a, <2 x half> %b) { | |
| ; ALL-LABEL: 'fcmp_v2f16' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cmp_oeq = fcmp oeq <2 x half> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cmp_olt = fcmp olt <2 x half> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'fcmp_v2f16' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cmp_oeq = fcmp oeq <2 x half> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %cmp_olt = fcmp olt <2 x half> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'fcmp_v2f16' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_oeq = fcmp oeq <2 x half> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_olt = fcmp olt <2 x half> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %cmp_oeq = fcmp oeq <2 x half> %a, %b | |
| %cmp_olt = fcmp olt <2 x half> %a, %b | |
| ret void | |
| } | |
| define void @fcmp_v3f16(<3 x half> %a, <3 x half> %b) { | |
| ; ALL-LABEL: 'fcmp_v3f16' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cmp_oeq = fcmp oeq <3 x half> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cmp_olt = fcmp olt <3 x half> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'fcmp_v3f16' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cmp_oeq = fcmp oeq <3 x half> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 5 for instruction: %cmp_olt = fcmp olt <3 x half> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'fcmp_v3f16' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_oeq = fcmp oeq <3 x half> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_olt = fcmp olt <3 x half> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %cmp_oeq = fcmp oeq <3 x half> %a, %b | |
| %cmp_olt = fcmp olt <3 x half> %a, %b | |
| ret void | |
| } | |
| define void @fcmp_v4f16(<4 x half> %a, <4 x half> %b) { | |
| ; ALL-LABEL: 'fcmp_v4f16' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cmp_oeq = fcmp oeq <4 x half> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cmp_olt = fcmp olt <4 x half> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'fcmp_v4f16' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cmp_oeq = fcmp oeq <4 x half> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 7 for instruction: %cmp_olt = fcmp olt <4 x half> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'fcmp_v4f16' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_oeq = fcmp oeq <4 x half> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_olt = fcmp olt <4 x half> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %cmp_oeq = fcmp oeq <4 x half> %a, %b | |
| %cmp_olt = fcmp olt <4 x half> %a, %b | |
| ret void | |
| } | |
| define void @icmp_v2ptr(<2 x ptr> %a, <2 x ptr> %b) { | |
| ; ALL-LABEL: 'icmp_v2ptr' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cmp_eq = icmp eq <2 x ptr> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cmp_ugt = icmp ugt <2 x ptr> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'icmp_v2ptr' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cmp_eq = icmp eq <2 x ptr> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %cmp_ugt = icmp ugt <2 x ptr> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'icmp_v2ptr' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_eq = icmp eq <2 x ptr> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_ugt = icmp ugt <2 x ptr> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %cmp_eq = icmp eq <2 x ptr> %a, %b | |
| %cmp_ugt = icmp ugt <2 x ptr> %a, %b | |
| ret void | |
| } | |
| define void @icmp_v4ptr(<4 x ptr> %a, <4 x ptr> %b) { | |
| ; ALL-LABEL: 'icmp_v4ptr' | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cmp_eq = icmp eq <4 x ptr> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cmp_ugt = icmp ugt <4 x ptr> %a, %b | |
| ; ALL-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LABEL: 'icmp_v4ptr' | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cmp_eq = icmp eq <4 x ptr> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %cmp_ugt = icmp ugt <4 x ptr> %a, %b | |
| ; ALL-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| ; ALL-SIZE-LATENCY-LABEL: 'icmp_v4ptr' | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_eq = icmp eq <4 x ptr> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %cmp_ugt = icmp ugt <4 x ptr> %a, %b | |
| ; ALL-SIZE-LATENCY-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void | |
| ; | |
| %cmp_eq = icmp eq <4 x ptr> %a, %b | |
| %cmp_ugt = icmp ugt <4 x ptr> %a, %b | |
| ret void | |
| } | |
| ;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line: | |
| ; GFX11: {{.*}} | |
| ; GFX8: {{.*}} | |
| ; GFX9: {{.*}} |