blob: 7d697825b2e35611809a15ec9a15954e979141b5 [file] [edit]
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=aarch64 | FileCheck %s --check-prefixes=CHECK,CHECK-BASE
; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=aarch64 -mattr=+fullfp16 | FileCheck %s --check-prefixes=CHECK,CHECK-FP16
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
define void @ceil() {
; CHECK-LABEL: 'ceil'
; CHECK-NEXT: Cost Model: Found costs of 1 for: %F32 = call float @llvm.ceil.f32(float poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V2F32 = call <2 x float> @llvm.ceil.v2f32(<2 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V4F32 = call <4 x float> @llvm.ceil.v4f32(<4 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 4 for: %V8F32 = call <8 x float> @llvm.ceil.v8f32(<8 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 8 for: %V16F32 = call <16 x float> @llvm.ceil.v16f32(<16 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %F64 = call double @llvm.ceil.f64(double poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V2F64 = call <2 x double> @llvm.ceil.v2f64(<2 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of 4 for: %V4F64 = call <4 x double> @llvm.ceil.v4f64(<4 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of 8 for: %V8F64 = call <8 x double> @llvm.ceil.v8f64(<8 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
%F32 = call float @llvm.ceil.f32(float poison)
%V2F32 = call <2 x float> @llvm.ceil.v2f32(<2 x float> poison)
%V4F32 = call <4 x float> @llvm.ceil.v4f32(<4 x float> poison)
%V8F32 = call <8 x float> @llvm.ceil.v8f32(<8 x float> poison)
%V16F32 = call <16 x float> @llvm.ceil.v16f32(<16 x float> poison)
%F64 = call double @llvm.ceil.f64(double poison)
%V2F64 = call <2 x double> @llvm.ceil.v2f64(<2 x double> poison)
%V4F64 = call <4 x double> @llvm.ceil.v4f64(<4 x double> poison)
%V8F64 = call <8 x double> @llvm.ceil.v8f64(<8 x double> poison)
ret void
}
define void @ceil_f16() {
; CHECK-BASE-LABEL: 'ceil_f16'
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %F16 = call half @llvm.ceil.f16(half poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %V2F16 = call <2 x half> @llvm.ceil.v2f16(<2 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %V4F16 = call <4 x half> @llvm.ceil.v4f16(<4 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:22 CodeSize:15 Lat:22 SizeLat:22 for: %V8F16 = call <8 x half> @llvm.ceil.v8f16(<8 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:44 CodeSize:30 Lat:44 SizeLat:44 for: %V16F16 = call <16 x half> @llvm.ceil.v16f16(<16 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
; CHECK-FP16-LABEL: 'ceil_f16'
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %F16 = call half @llvm.ceil.f16(half poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V2F16 = call <2 x half> @llvm.ceil.v2f16(<2 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V4F16 = call <4 x half> @llvm.ceil.v4f16(<4 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V8F16 = call <8 x half> @llvm.ceil.v8f16(<8 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 4 for: %V16F16 = call <16 x half> @llvm.ceil.v16f16(<16 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
%F16 = call half @llvm.ceil.f16(half poison)
%V2F16 = call <2 x half> @llvm.ceil.v2f16(<2 x half> poison)
%V4F16 = call <4 x half> @llvm.ceil.v4f16(<4 x half> poison)
%V8F16 = call <8 x half> @llvm.ceil.v8f16(<8 x half> poison)
%V16F16 = call <16 x half> @llvm.ceil.v16f16(<16 x half> poison)
ret void
}
define void @floor() {
; CHECK-LABEL: 'floor'
; CHECK-NEXT: Cost Model: Found costs of 1 for: %F32 = call float @llvm.floor.f32(float poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V2F32 = call <2 x float> @llvm.floor.v2f32(<2 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V4F32 = call <4 x float> @llvm.floor.v4f32(<4 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 4 for: %V8F32 = call <8 x float> @llvm.floor.v8f32(<8 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 8 for: %V16F32 = call <16 x float> @llvm.floor.v16f32(<16 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %F64 = call double @llvm.floor.f64(double poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V2F64 = call <2 x double> @llvm.floor.v2f64(<2 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of 4 for: %V4F64 = call <4 x double> @llvm.floor.v4f64(<4 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of 8 for: %V8F64 = call <8 x double> @llvm.floor.v8f64(<8 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
%F32 = call float @llvm.floor.f32(float poison)
%V2F32 = call <2 x float> @llvm.floor.v2f32(<2 x float> poison)
%V4F32 = call <4 x float> @llvm.floor.v4f32(<4 x float> poison)
%V8F32 = call <8 x float> @llvm.floor.v8f32(<8 x float> poison)
%V16F32 = call <16 x float> @llvm.floor.v16f32(<16 x float> poison)
%F64 = call double @llvm.floor.f64(double poison)
%V2F64 = call <2 x double> @llvm.floor.v2f64(<2 x double> poison)
%V4F64 = call <4 x double> @llvm.floor.v4f64(<4 x double> poison)
%V8F64 = call <8 x double> @llvm.floor.v8f64(<8 x double> poison)
ret void
}
define void @floor_f16() {
; CHECK-BASE-LABEL: 'floor_f16'
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %F16 = call half @llvm.floor.f16(half poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %V2F16 = call <2 x half> @llvm.floor.v2f16(<2 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %V4F16 = call <4 x half> @llvm.floor.v4f16(<4 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:22 CodeSize:15 Lat:22 SizeLat:22 for: %V8F16 = call <8 x half> @llvm.floor.v8f16(<8 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:44 CodeSize:30 Lat:44 SizeLat:44 for: %V16F16 = call <16 x half> @llvm.floor.v16f16(<16 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
; CHECK-FP16-LABEL: 'floor_f16'
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %F16 = call half @llvm.floor.f16(half poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V2F16 = call <2 x half> @llvm.floor.v2f16(<2 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V4F16 = call <4 x half> @llvm.floor.v4f16(<4 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V8F16 = call <8 x half> @llvm.floor.v8f16(<8 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 4 for: %V16F16 = call <16 x half> @llvm.floor.v16f16(<16 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
%F16 = call half @llvm.floor.f16(half poison)
%V2F16 = call <2 x half> @llvm.floor.v2f16(<2 x half> poison)
%V4F16 = call <4 x half> @llvm.floor.v4f16(<4 x half> poison)
%V8F16 = call <8 x half> @llvm.floor.v8f16(<8 x half> poison)
%V16F16 = call <16 x half> @llvm.floor.v16f16(<16 x half> poison)
ret void
}
define void @nearbyint() {
; CHECK-LABEL: 'nearbyint'
; CHECK-NEXT: Cost Model: Found costs of 1 for: %F32 = call float @llvm.nearbyint.f32(float poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V2F32 = call <2 x float> @llvm.nearbyint.v2f32(<2 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V4F32 = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 4 for: %V8F32 = call <8 x float> @llvm.nearbyint.v8f32(<8 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 8 for: %V16F32 = call <16 x float> @llvm.nearbyint.v16f32(<16 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %F64 = call double @llvm.nearbyint.f64(double poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V2F64 = call <2 x double> @llvm.nearbyint.v2f64(<2 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of 4 for: %V4F64 = call <4 x double> @llvm.nearbyint.v4f64(<4 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of 8 for: %V8F64 = call <8 x double> @llvm.nearbyint.v8f64(<8 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
%F32 = call float @llvm.nearbyint.f32(float poison)
%V2F32 = call <2 x float> @llvm.nearbyint.v2f32(<2 x float> poison)
%V4F32 = call <4 x float> @llvm.nearbyint.v4f32(<4 x float> poison)
%V8F32 = call <8 x float> @llvm.nearbyint.v8f32(<8 x float> poison)
%V16F32 = call <16 x float> @llvm.nearbyint.v16f32(<16 x float> poison)
%F64 = call double @llvm.nearbyint.f64(double poison)
%V2F64 = call <2 x double> @llvm.nearbyint.v2f64(<2 x double> poison)
%V4F64 = call <4 x double> @llvm.nearbyint.v4f64(<4 x double> poison)
%V8F64 = call <8 x double> @llvm.nearbyint.v8f64(<8 x double> poison)
ret void
}
define void @nearbyint_f16() {
; CHECK-BASE-LABEL: 'nearbyint_f16'
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %F16 = call half @llvm.nearbyint.f16(half poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %V2F16 = call <2 x half> @llvm.nearbyint.v2f16(<2 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %V4F16 = call <4 x half> @llvm.nearbyint.v4f16(<4 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:22 CodeSize:15 Lat:22 SizeLat:22 for: %V8F16 = call <8 x half> @llvm.nearbyint.v8f16(<8 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:44 CodeSize:30 Lat:44 SizeLat:44 for: %V16F16 = call <16 x half> @llvm.nearbyint.v16f16(<16 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
; CHECK-FP16-LABEL: 'nearbyint_f16'
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %F16 = call half @llvm.nearbyint.f16(half poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V2F16 = call <2 x half> @llvm.nearbyint.v2f16(<2 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V4F16 = call <4 x half> @llvm.nearbyint.v4f16(<4 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V8F16 = call <8 x half> @llvm.nearbyint.v8f16(<8 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 4 for: %V16F16 = call <16 x half> @llvm.nearbyint.v16f16(<16 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
%F16 = call half @llvm.nearbyint.f16(half poison)
%V2F16 = call <2 x half> @llvm.nearbyint.v2f16(<2 x half> poison)
%V4F16 = call <4 x half> @llvm.nearbyint.v4f16(<4 x half> poison)
%V8F16 = call <8 x half> @llvm.nearbyint.v8f16(<8 x half> poison)
%V16F16 = call <16 x half> @llvm.nearbyint.v16f16(<16 x half> poison)
ret void
}
define void @roundeven() {
; CHECK-LABEL: 'roundeven'
; CHECK-NEXT: Cost Model: Found costs of 1 for: %F32 = call float @llvm.roundeven.f32(float poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V2F32 = call <2 x float> @llvm.roundeven.v2f32(<2 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V4F32 = call <4 x float> @llvm.roundeven.v4f32(<4 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 4 for: %V8F32 = call <8 x float> @llvm.roundeven.v8f32(<8 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 8 for: %V16F32 = call <16 x float> @llvm.roundeven.v16f32(<16 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %F64 = call double @llvm.roundeven.f64(double poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V2F64 = call <2 x double> @llvm.roundeven.v2f64(<2 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of 4 for: %V4F64 = call <4 x double> @llvm.roundeven.v4f64(<4 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of 8 for: %V8F64 = call <8 x double> @llvm.roundeven.v8f64(<8 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
%F32 = call float @llvm.roundeven.f32(float poison)
%V2F32 = call <2 x float> @llvm.roundeven.v2f32(<2 x float> poison)
%V4F32 = call <4 x float> @llvm.roundeven.v4f32(<4 x float> poison)
%V8F32 = call <8 x float> @llvm.roundeven.v8f32(<8 x float> poison)
%V16F32 = call <16 x float> @llvm.roundeven.v16f32(<16 x float> poison)
%F64 = call double @llvm.roundeven.f64(double poison)
%V2F64 = call <2 x double> @llvm.roundeven.v2f64(<2 x double> poison)
%V4F64 = call <4 x double> @llvm.roundeven.v4f64(<4 x double> poison)
%V8F64 = call <8 x double> @llvm.roundeven.v8f64(<8 x double> poison)
ret void
}
define void @roundeven_f16() {
; CHECK-BASE-LABEL: 'roundeven_f16'
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %F16 = call half @llvm.roundeven.f16(half poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %V2F16 = call <2 x half> @llvm.roundeven.v2f16(<2 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %V4F16 = call <4 x half> @llvm.roundeven.v4f16(<4 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:22 CodeSize:15 Lat:22 SizeLat:22 for: %V8F16 = call <8 x half> @llvm.roundeven.v8f16(<8 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:44 CodeSize:30 Lat:44 SizeLat:44 for: %V16F16 = call <16 x half> @llvm.roundeven.v16f16(<16 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
; CHECK-FP16-LABEL: 'roundeven_f16'
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %F16 = call half @llvm.roundeven.f16(half poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V2F16 = call <2 x half> @llvm.roundeven.v2f16(<2 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V4F16 = call <4 x half> @llvm.roundeven.v4f16(<4 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V8F16 = call <8 x half> @llvm.roundeven.v8f16(<8 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 4 for: %V16F16 = call <16 x half> @llvm.roundeven.v16f16(<16 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
%F16 = call half @llvm.roundeven.f16(half poison)
%V2F16 = call <2 x half> @llvm.roundeven.v2f16(<2 x half> poison)
%V4F16 = call <4 x half> @llvm.roundeven.v4f16(<4 x half> poison)
%V8F16 = call <8 x half> @llvm.roundeven.v8f16(<8 x half> poison)
%V16F16 = call <16 x half> @llvm.roundeven.v16f16(<16 x half> poison)
ret void
}
define void @rint() {
; CHECK-LABEL: 'rint'
; CHECK-NEXT: Cost Model: Found costs of 1 for: %F32 = call float @llvm.rint.f32(float poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V2F32 = call <2 x float> @llvm.rint.v2f32(<2 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V4F32 = call <4 x float> @llvm.rint.v4f32(<4 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 4 for: %V8F32 = call <8 x float> @llvm.rint.v8f32(<8 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 8 for: %V16F32 = call <16 x float> @llvm.rint.v16f32(<16 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %F64 = call double @llvm.rint.f64(double poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V2F64 = call <2 x double> @llvm.rint.v2f64(<2 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of 4 for: %V4F64 = call <4 x double> @llvm.rint.v4f64(<4 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of 8 for: %V8F64 = call <8 x double> @llvm.rint.v8f64(<8 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
%F32 = call float @llvm.rint.f32(float poison)
%V2F32 = call <2 x float> @llvm.rint.v2f32(<2 x float> poison)
%V4F32 = call <4 x float> @llvm.rint.v4f32(<4 x float> poison)
%V8F32 = call <8 x float> @llvm.rint.v8f32(<8 x float> poison)
%V16F32 = call <16 x float> @llvm.rint.v16f32(<16 x float> poison)
%F64 = call double @llvm.rint.f64(double poison)
%V2F64 = call <2 x double> @llvm.rint.v2f64(<2 x double> poison)
%V4F64 = call <4 x double> @llvm.rint.v4f64(<4 x double> poison)
%V8F64 = call <8 x double> @llvm.rint.v8f64(<8 x double> poison)
ret void
}
define void @rint_f16() {
; CHECK-BASE-LABEL: 'rint_f16'
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %F16 = call half @llvm.rint.f16(half poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %V2F16 = call <2 x half> @llvm.rint.v2f16(<2 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %V4F16 = call <4 x half> @llvm.rint.v4f16(<4 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:22 CodeSize:15 Lat:22 SizeLat:22 for: %V8F16 = call <8 x half> @llvm.rint.v8f16(<8 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:44 CodeSize:30 Lat:44 SizeLat:44 for: %V16F16 = call <16 x half> @llvm.rint.v16f16(<16 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
; CHECK-FP16-LABEL: 'rint_f16'
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %F16 = call half @llvm.rint.f16(half poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V2F16 = call <2 x half> @llvm.rint.v2f16(<2 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V4F16 = call <4 x half> @llvm.rint.v4f16(<4 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V8F16 = call <8 x half> @llvm.rint.v8f16(<8 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 4 for: %V16F16 = call <16 x half> @llvm.rint.v16f16(<16 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
%F16 = call half @llvm.rint.f16(half poison)
%V2F16 = call <2 x half> @llvm.rint.v2f16(<2 x half> poison)
%V4F16 = call <4 x half> @llvm.rint.v4f16(<4 x half> poison)
%V8F16 = call <8 x half> @llvm.rint.v8f16(<8 x half> poison)
%V16F16 = call <16 x half> @llvm.rint.v16f16(<16 x half> poison)
ret void
}
define void @round() {
; CHECK-LABEL: 'round'
; CHECK-NEXT: Cost Model: Found costs of 1 for: %F32 = call float @llvm.round.f32(float poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V2F32 = call <2 x float> @llvm.round.v2f32(<2 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V4F32 = call <4 x float> @llvm.round.v4f32(<4 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 4 for: %V8F32 = call <8 x float> @llvm.round.v8f32(<8 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 8 for: %V16F32 = call <16 x float> @llvm.round.v16f32(<16 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %F64 = call double @llvm.round.f64(double poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V2F64 = call <2 x double> @llvm.round.v2f64(<2 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of 4 for: %V4F64 = call <4 x double> @llvm.round.v4f64(<4 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of 8 for: %V8F64 = call <8 x double> @llvm.round.v8f64(<8 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
%F32 = call float @llvm.round.f32(float poison)
%V2F32 = call <2 x float> @llvm.round.v2f32(<2 x float> poison)
%V4F32 = call <4 x float> @llvm.round.v4f32(<4 x float> poison)
%V8F32 = call <8 x float> @llvm.round.v8f32(<8 x float> poison)
%V16F32 = call <16 x float> @llvm.round.v16f32(<16 x float> poison)
%F64 = call double @llvm.round.f64(double poison)
%V2F64 = call <2 x double> @llvm.round.v2f64(<2 x double> poison)
%V4F64 = call <4 x double> @llvm.round.v4f64(<4 x double> poison)
%V8F64 = call <8 x double> @llvm.round.v8f64(<8 x double> poison)
ret void
}
define void @round_f16() {
; CHECK-BASE-LABEL: 'round_f16'
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %F16 = call half @llvm.round.f16(half poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %V2F16 = call <2 x half> @llvm.round.v2f16(<2 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %V4F16 = call <4 x half> @llvm.round.v4f16(<4 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:22 CodeSize:15 Lat:22 SizeLat:22 for: %V8F16 = call <8 x half> @llvm.round.v8f16(<8 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:44 CodeSize:30 Lat:44 SizeLat:44 for: %V16F16 = call <16 x half> @llvm.round.v16f16(<16 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
; CHECK-FP16-LABEL: 'round_f16'
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %F16 = call half @llvm.round.f16(half poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V2F16 = call <2 x half> @llvm.round.v2f16(<2 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V4F16 = call <4 x half> @llvm.round.v4f16(<4 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V8F16 = call <8 x half> @llvm.round.v8f16(<8 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 4 for: %V16F16 = call <16 x half> @llvm.round.v16f16(<16 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
%F16 = call half @llvm.round.f16(half poison)
%V2F16 = call <2 x half> @llvm.round.v2f16(<2 x half> poison)
%V4F16 = call <4 x half> @llvm.round.v4f16(<4 x half> poison)
%V8F16 = call <8 x half> @llvm.round.v8f16(<8 x half> poison)
%V16F16 = call <16 x half> @llvm.round.v16f16(<16 x half> poison)
ret void
}
define void @trunc() {
; CHECK-LABEL: 'trunc'
; CHECK-NEXT: Cost Model: Found costs of 1 for: %F32 = call float @llvm.trunc.f32(float poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V2F32 = call <2 x float> @llvm.trunc.v2f32(<2 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V4F32 = call <4 x float> @llvm.trunc.v4f32(<4 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 4 for: %V8F32 = call <8 x float> @llvm.trunc.v8f32(<8 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 8 for: %V16F32 = call <16 x float> @llvm.trunc.v16f32(<16 x float> poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %F64 = call double @llvm.trunc.f64(double poison)
; CHECK-NEXT: Cost Model: Found costs of 1 for: %V2F64 = call <2 x double> @llvm.trunc.v2f64(<2 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of 4 for: %V4F64 = call <4 x double> @llvm.trunc.v4f64(<4 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of 8 for: %V8F64 = call <8 x double> @llvm.trunc.v8f64(<8 x double> poison)
; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
%F32 = call float @llvm.trunc.f32(float poison)
%V2F32 = call <2 x float> @llvm.trunc.v2f32(<2 x float> poison)
%V4F32 = call <4 x float> @llvm.trunc.v4f32(<4 x float> poison)
%V8F32 = call <8 x float> @llvm.trunc.v8f32(<8 x float> poison)
%V16F32 = call <16 x float> @llvm.trunc.v16f32(<16 x float> poison)
%F64 = call double @llvm.trunc.f64(double poison)
%V2F64 = call <2 x double> @llvm.trunc.v2f64(<2 x double> poison)
%V4F64 = call <4 x double> @llvm.trunc.v4f64(<4 x double> poison)
%V8F64 = call <8 x double> @llvm.trunc.v8f64(<8 x double> poison)
ret void
}
define void @trunc_f16() {
; CHECK-BASE-LABEL: 'trunc_f16'
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %F16 = call half @llvm.trunc.f16(half poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %V2F16 = call <2 x half> @llvm.trunc.v2f16(<2 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of 1 for: %V4F16 = call <4 x half> @llvm.trunc.v4f16(<4 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:22 CodeSize:15 Lat:22 SizeLat:22 for: %V8F16 = call <8 x half> @llvm.trunc.v8f16(<8 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:44 CodeSize:30 Lat:44 SizeLat:44 for: %V16F16 = call <16 x half> @llvm.trunc.v16f16(<16 x half> poison)
; CHECK-BASE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
; CHECK-FP16-LABEL: 'trunc_f16'
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %F16 = call half @llvm.trunc.f16(half poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V2F16 = call <2 x half> @llvm.trunc.v2f16(<2 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V4F16 = call <4 x half> @llvm.trunc.v4f16(<4 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 1 for: %V8F16 = call <8 x half> @llvm.trunc.v8f16(<8 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of 4 for: %V16F16 = call <16 x half> @llvm.trunc.v16f16(<16 x half> poison)
; CHECK-FP16-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void
;
%F16 = call half @llvm.trunc.f16(half poison)
%V2F16 = call <2 x half> @llvm.trunc.v2f16(<2 x half> poison)
%V4F16 = call <4 x half> @llvm.trunc.v4f16(<4 x half> poison)
%V8F16 = call <8 x half> @llvm.trunc.v8f16(<8 x half> poison)
%V16F16 = call <16 x half> @llvm.trunc.v16f16(<16 x half> poison)
ret void
}