| ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py |
| ; RUN: opt -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=aarch64 -mattr=+sve2 %s | FileCheck %s |
| |
| target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128" |
| target triple = "aarch64-linux-gnu" |
| |
| define void @lrint() { |
| ; CHECK-LABEL: 'lrint' |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %1 = call <vscale x 2 x i64> @llvm.lrint.nxv2i64.nxv2f32(<vscale x 2 x float> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %2 = call <vscale x 4 x i64> @llvm.lrint.nxv4i64.nxv4f32(<vscale x 4 x float> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %3 = call <vscale x 8 x i64> @llvm.lrint.nxv8i64.nxv8f32(<vscale x 8 x float> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %4 = call <vscale x 16 x i64> @llvm.lrint.nxv16i64.nxv16f32(<vscale x 16 x float> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %5 = call <vscale x 2 x i64> @llvm.lrint.nxv2i64.nxv2f64(<vscale x 2 x double> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %6 = call <vscale x 4 x i64> @llvm.lrint.nxv4i64.nxv4f64(<vscale x 4 x double> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %7 = call <vscale x 8 x i64> @llvm.lrint.nxv8i64.nxv8f64(<vscale x 8 x double> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %8 = call <vscale x 16 x i64> @llvm.lrint.nxv16i64.nxv16f64(<vscale x 16 x double> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void |
| ; |
| call <vscale x 2 x i64> @llvm.lrint(<vscale x 2 x float> poison) |
| call <vscale x 4 x i64> @llvm.lrint(<vscale x 4 x float> poison) |
| call <vscale x 8 x i64> @llvm.lrint(<vscale x 8 x float> poison) |
| call <vscale x 16 x i64> @llvm.lrint(<vscale x 16 x float> poison) |
| call <vscale x 2 x i64> @llvm.lrint(<vscale x 2 x double> poison) |
| call <vscale x 4 x i64> @llvm.lrint(<vscale x 4 x double> poison) |
| call <vscale x 8 x i64> @llvm.lrint(<vscale x 8 x double> poison) |
| call <vscale x 16 x i64> @llvm.lrint(<vscale x 16 x double> poison) |
| ret void |
| } |
| |
| define void @lrint_fp16() { |
| ; CHECK-LABEL: 'lrint_fp16' |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %1 = call <vscale x 2 x i64> @llvm.lrint.nxv2i64.nxv2f16(<vscale x 2 x half> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %2 = call <vscale x 4 x i64> @llvm.lrint.nxv4i64.nxv4f16(<vscale x 4 x half> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %3 = call <vscale x 8 x i64> @llvm.lrint.nxv8i64.nxv8f16(<vscale x 8 x half> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %4 = call <vscale x 16 x i64> @llvm.lrint.nxv16i64.nxv16f16(<vscale x 16 x half> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void |
| ; |
| call <vscale x 2 x i64> @llvm.lrint(<vscale x 2 x half> poison) |
| call <vscale x 4 x i64> @llvm.lrint(<vscale x 4 x half> poison) |
| call <vscale x 8 x i64> @llvm.lrint(<vscale x 8 x half> poison) |
| call <vscale x 16 x i64> @llvm.lrint(<vscale x 16 x half> poison) |
| ret void |
| } |
| |
| define void @lrint_bf16() { |
| ; CHECK-LABEL: 'lrint_bf16' |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %1 = call <vscale x 2 x i64> @llvm.lrint.nxv2i64.nxv2bf16(<vscale x 2 x bfloat> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %2 = call <vscale x 4 x i64> @llvm.lrint.nxv4i64.nxv4bf16(<vscale x 4 x bfloat> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %3 = call <vscale x 8 x i64> @llvm.lrint.nxv8i64.nxv8bf16(<vscale x 8 x bfloat> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %4 = call <vscale x 16 x i64> @llvm.lrint.nxv16i64.nxv16bf16(<vscale x 16 x bfloat> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void |
| ; |
| call <vscale x 2 x i64> @llvm.lrint(<vscale x 2 x bfloat> poison) |
| call <vscale x 4 x i64> @llvm.lrint(<vscale x 4 x bfloat> poison) |
| call <vscale x 8 x i64> @llvm.lrint(<vscale x 8 x bfloat> poison) |
| call <vscale x 16 x i64> @llvm.lrint(<vscale x 16 x bfloat> poison) |
| ret void |
| } |
| |
| define void @llrint() { |
| ; CHECK-LABEL: 'llrint' |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %1 = call <vscale x 2 x i64> @llvm.llrint.nxv2i64.nxv2f32(<vscale x 2 x float> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %2 = call <vscale x 4 x i64> @llvm.llrint.nxv4i64.nxv4f32(<vscale x 4 x float> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %3 = call <vscale x 8 x i64> @llvm.llrint.nxv8i64.nxv8f32(<vscale x 8 x float> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %4 = call <vscale x 16 x i64> @llvm.llrint.nxv16i64.nxv16f32(<vscale x 16 x float> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %5 = call <vscale x 2 x i64> @llvm.llrint.nxv2i64.nxv2f64(<vscale x 2 x double> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %6 = call <vscale x 4 x i64> @llvm.llrint.nxv4i64.nxv4f64(<vscale x 4 x double> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %7 = call <vscale x 8 x i64> @llvm.llrint.nxv8i64.nxv8f64(<vscale x 8 x double> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %8 = call <vscale x 16 x i64> @llvm.llrint.nxv16i64.nxv16f64(<vscale x 16 x double> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void |
| ; |
| call <vscale x 2 x i64> @llvm.llrint(<vscale x 2 x float> poison) |
| call <vscale x 4 x i64> @llvm.llrint(<vscale x 4 x float> poison) |
| call <vscale x 8 x i64> @llvm.llrint(<vscale x 8 x float> poison) |
| call <vscale x 16 x i64> @llvm.llrint(<vscale x 16 x float> poison) |
| call <vscale x 2 x i64> @llvm.llrint(<vscale x 2 x double> poison) |
| call <vscale x 4 x i64> @llvm.llrint(<vscale x 4 x double> poison) |
| call <vscale x 8 x i64> @llvm.llrint(<vscale x 8 x double> poison) |
| call <vscale x 16 x i64> @llvm.llrint(<vscale x 16 x double> poison) |
| ret void |
| } |
| |
| define void @llrint_fp16() { |
| ; CHECK-LABEL: 'llrint_fp16' |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %1 = call <vscale x 2 x i64> @llvm.llrint.nxv2i64.nxv2f16(<vscale x 2 x half> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %2 = call <vscale x 4 x i64> @llvm.llrint.nxv4i64.nxv4f16(<vscale x 4 x half> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %3 = call <vscale x 8 x i64> @llvm.llrint.nxv8i64.nxv8f16(<vscale x 8 x half> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %4 = call <vscale x 16 x i64> @llvm.llrint.nxv16i64.nxv16f16(<vscale x 16 x half> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void |
| ; |
| call <vscale x 2 x i64> @llvm.llrint(<vscale x 2 x half> poison) |
| call <vscale x 4 x i64> @llvm.llrint(<vscale x 4 x half> poison) |
| call <vscale x 8 x i64> @llvm.llrint(<vscale x 8 x half> poison) |
| call <vscale x 16 x i64> @llvm.llrint(<vscale x 16 x half> poison) |
| ret void |
| } |
| |
| define void @llrint_bf16() { |
| ; CHECK-LABEL: 'llrint_bf16' |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %1 = call <vscale x 2 x i64> @llvm.llrint.nxv2i64.nxv2bf16(<vscale x 2 x bfloat> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %2 = call <vscale x 4 x i64> @llvm.llrint.nxv4i64.nxv4bf16(<vscale x 4 x bfloat> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %3 = call <vscale x 8 x i64> @llvm.llrint.nxv8i64.nxv8bf16(<vscale x 8 x bfloat> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %4 = call <vscale x 16 x i64> @llvm.llrint.nxv16i64.nxv16bf16(<vscale x 16 x bfloat> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void |
| ; |
| call <vscale x 2 x i64> @llvm.llrint(<vscale x 2 x bfloat> poison) |
| call <vscale x 4 x i64> @llvm.llrint(<vscale x 4 x bfloat> poison) |
| call <vscale x 8 x i64> @llvm.llrint(<vscale x 8 x bfloat> poison) |
| call <vscale x 16 x i64> @llvm.llrint(<vscale x 16 x bfloat> poison) |
| ret void |
| } |
| |
| |
| define void @lround() { |
| ; CHECK-LABEL: 'lround' |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %1 = call <vscale x 2 x i64> @llvm.lround.nxv2i64.nxv2f32(<vscale x 2 x float> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %2 = call <vscale x 4 x i64> @llvm.lround.nxv4i64.nxv4f32(<vscale x 4 x float> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %3 = call <vscale x 8 x i64> @llvm.lround.nxv8i64.nxv8f32(<vscale x 8 x float> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %4 = call <vscale x 16 x i64> @llvm.lround.nxv16i64.nxv16f32(<vscale x 16 x float> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %5 = call <vscale x 2 x i64> @llvm.lround.nxv2i64.nxv2f64(<vscale x 2 x double> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %6 = call <vscale x 4 x i64> @llvm.lround.nxv4i64.nxv4f64(<vscale x 4 x double> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %7 = call <vscale x 8 x i64> @llvm.lround.nxv8i64.nxv8f64(<vscale x 8 x double> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %8 = call <vscale x 16 x i64> @llvm.lround.nxv16i64.nxv16f64(<vscale x 16 x double> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void |
| ; |
| call <vscale x 2 x i64> @llvm.lround(<vscale x 2 x float> poison) |
| call <vscale x 4 x i64> @llvm.lround(<vscale x 4 x float> poison) |
| call <vscale x 8 x i64> @llvm.lround(<vscale x 8 x float> poison) |
| call <vscale x 16 x i64> @llvm.lround(<vscale x 16 x float> poison) |
| call <vscale x 2 x i64> @llvm.lround(<vscale x 2 x double> poison) |
| call <vscale x 4 x i64> @llvm.lround(<vscale x 4 x double> poison) |
| call <vscale x 8 x i64> @llvm.lround(<vscale x 8 x double> poison) |
| call <vscale x 16 x i64> @llvm.lround(<vscale x 16 x double> poison) |
| ret void |
| } |
| |
| define void @lround_fp16() { |
| ; CHECK-LABEL: 'lround_fp16' |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %1 = call <vscale x 2 x i64> @llvm.lround.nxv2i64.nxv2f16(<vscale x 2 x half> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %2 = call <vscale x 4 x i64> @llvm.lround.nxv4i64.nxv4f16(<vscale x 4 x half> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %3 = call <vscale x 8 x i64> @llvm.lround.nxv8i64.nxv8f16(<vscale x 8 x half> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %4 = call <vscale x 16 x i64> @llvm.lround.nxv16i64.nxv16f16(<vscale x 16 x half> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void |
| ; |
| call <vscale x 2 x i64> @llvm.lround(<vscale x 2 x half> poison) |
| call <vscale x 4 x i64> @llvm.lround(<vscale x 4 x half> poison) |
| call <vscale x 8 x i64> @llvm.lround(<vscale x 8 x half> poison) |
| call <vscale x 16 x i64> @llvm.lround(<vscale x 16 x half> poison) |
| ret void |
| } |
| |
| define void @lround_bf16() { |
| ; CHECK-LABEL: 'lround_bf16' |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %1 = call <vscale x 2 x i64> @llvm.lround.nxv2i64.nxv2bf16(<vscale x 2 x bfloat> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %2 = call <vscale x 4 x i64> @llvm.lround.nxv4i64.nxv4bf16(<vscale x 4 x bfloat> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %3 = call <vscale x 8 x i64> @llvm.lround.nxv8i64.nxv8bf16(<vscale x 8 x bfloat> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %4 = call <vscale x 16 x i64> @llvm.lround.nxv16i64.nxv16bf16(<vscale x 16 x bfloat> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void |
| ; |
| call <vscale x 2 x i64> @llvm.lround(<vscale x 2 x bfloat> poison) |
| call <vscale x 4 x i64> @llvm.lround(<vscale x 4 x bfloat> poison) |
| call <vscale x 8 x i64> @llvm.lround(<vscale x 8 x bfloat> poison) |
| call <vscale x 16 x i64> @llvm.lround(<vscale x 16 x bfloat> poison) |
| ret void |
| } |
| |
| define void @llround() { |
| ; CHECK-LABEL: 'llround' |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %1 = call <vscale x 2 x i64> @llvm.llround.nxv2i64.nxv2f32(<vscale x 2 x float> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %2 = call <vscale x 4 x i64> @llvm.llround.nxv4i64.nxv4f32(<vscale x 4 x float> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %3 = call <vscale x 8 x i64> @llvm.llround.nxv8i64.nxv8f32(<vscale x 8 x float> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %4 = call <vscale x 16 x i64> @llvm.llround.nxv16i64.nxv16f32(<vscale x 16 x float> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %5 = call <vscale x 2 x i64> @llvm.llround.nxv2i64.nxv2f64(<vscale x 2 x double> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %6 = call <vscale x 4 x i64> @llvm.llround.nxv4i64.nxv4f64(<vscale x 4 x double> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %7 = call <vscale x 8 x i64> @llvm.llround.nxv8i64.nxv8f64(<vscale x 8 x double> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %8 = call <vscale x 16 x i64> @llvm.llround.nxv16i64.nxv16f64(<vscale x 16 x double> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void |
| ; |
| call <vscale x 2 x i64> @llvm.llround(<vscale x 2 x float> poison) |
| call <vscale x 4 x i64> @llvm.llround(<vscale x 4 x float> poison) |
| call <vscale x 8 x i64> @llvm.llround(<vscale x 8 x float> poison) |
| call <vscale x 16 x i64> @llvm.llround(<vscale x 16 x float> poison) |
| call <vscale x 2 x i64> @llvm.llround(<vscale x 2 x double> poison) |
| call <vscale x 4 x i64> @llvm.llround(<vscale x 4 x double> poison) |
| call <vscale x 8 x i64> @llvm.llround(<vscale x 8 x double> poison) |
| call <vscale x 16 x i64> @llvm.llround(<vscale x 16 x double> poison) |
| ret void |
| } |
| |
| define void @llround_fp16() { |
| ; CHECK-LABEL: 'llround_fp16' |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %1 = call <vscale x 2 x i64> @llvm.llround.nxv2i64.nxv2f16(<vscale x 2 x half> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %2 = call <vscale x 4 x i64> @llvm.llround.nxv4i64.nxv4f16(<vscale x 4 x half> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %3 = call <vscale x 8 x i64> @llvm.llround.nxv8i64.nxv8f16(<vscale x 8 x half> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %4 = call <vscale x 16 x i64> @llvm.llround.nxv16i64.nxv16f16(<vscale x 16 x half> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void |
| ; |
| call <vscale x 2 x i64> @llvm.llround(<vscale x 2 x half> poison) |
| call <vscale x 4 x i64> @llvm.llround(<vscale x 4 x half> poison) |
| call <vscale x 8 x i64> @llvm.llround(<vscale x 8 x half> poison) |
| call <vscale x 16 x i64> @llvm.llround(<vscale x 16 x half> poison) |
| ret void |
| } |
| |
| define void @llround_bf16() { |
| ; CHECK-LABEL: 'llround_bf16' |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %1 = call <vscale x 2 x i64> @llvm.llround.nxv2i64.nxv2bf16(<vscale x 2 x bfloat> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %2 = call <vscale x 4 x i64> @llvm.llround.nxv4i64.nxv4bf16(<vscale x 4 x bfloat> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %3 = call <vscale x 8 x i64> @llvm.llround.nxv8i64.nxv8bf16(<vscale x 8 x bfloat> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of Invalid for: %4 = call <vscale x 16 x i64> @llvm.llround.nxv16i64.nxv16bf16(<vscale x 16 x bfloat> poison) |
| ; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void |
| ; |
| call <vscale x 2 x i64> @llvm.llround(<vscale x 2 x bfloat> poison) |
| call <vscale x 4 x i64> @llvm.llround(<vscale x 4 x bfloat> poison) |
| call <vscale x 8 x i64> @llvm.llround(<vscale x 8 x bfloat> poison) |
| call <vscale x 16 x i64> @llvm.llround(<vscale x 16 x bfloat> poison) |
| ret void |
| } |