1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py 2; RUN: opt -mtriple=aarch64-- -mattr=+sve -cost-model -analyze -cost-kind=throughput < %s | FileCheck %s --check-prefix=THRU 3; RUN: opt -mtriple=aarch64-- -mattr=+sve -cost-model -analyze -cost-kind=latency < %s | FileCheck %s --check-prefix=LATE 4; RUN: opt -mtriple=aarch64-- -mattr=+sve -cost-model -analyze -cost-kind=code-size < %s | FileCheck %s --check-prefix=SIZE 5; RUN: opt -mtriple=aarch64-- -mattr=+sve -cost-model -analyze -cost-kind=size-latency < %s | FileCheck %s --check-prefix=SIZE_LATE 6 7declare <vscale x 2 x double> @llvm.sqrt.v2f64(<vscale x 2 x double>) 8 9define <vscale x 2 x double> @fadd_v2f64(<vscale x 2 x double> %a, <vscale x 2 x double> %b) { 10; THRU-LABEL: 'fadd_v2f64' 11; THRU-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %r = fadd <vscale x 2 x double> %a, %b 12; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <vscale x 2 x double> %r 13; 14; LATE-LABEL: 'fadd_v2f64' 15; LATE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r = fadd <vscale x 2 x double> %a, %b 16; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <vscale x 2 x double> %r 17; 18; SIZE-LABEL: 'fadd_v2f64' 19; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = fadd <vscale x 2 x double> %a, %b 20; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <vscale x 2 x double> %r 21; 22; SIZE_LATE-LABEL: 'fadd_v2f64' 23; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = fadd <vscale x 2 x double> %a, %b 24; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <vscale x 2 x double> %r 25; 26 %r = fadd <vscale x 2 x double> %a, %b 27 ret <vscale x 2 x double> %r 28} 29 30define <vscale x 2 x double> @sqrt_v2f64(<vscale x 2 x double> %a) { 31; THRU-LABEL: 'sqrt_v2f64' 32; THRU-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = call <vscale x 2 x double> @llvm.sqrt.nxv2f64(<vscale x 2 x double> %a) 33; THRU-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret <vscale x 2 x double> %r 34; 35; LATE-LABEL: 'sqrt_v2f64' 36; LATE-NEXT: Cost Model: Found an estimated cost of 3 for instruction: %r = call <vscale x 2 x double> @llvm.sqrt.nxv2f64(<vscale x 2 x double> %a) 37; LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <vscale x 2 x double> %r 38; 39; SIZE-LABEL: 'sqrt_v2f64' 40; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = call <vscale x 2 x double> @llvm.sqrt.nxv2f64(<vscale x 2 x double> %a) 41; SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <vscale x 2 x double> %r 42; 43; SIZE_LATE-LABEL: 'sqrt_v2f64' 44; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %r = call <vscale x 2 x double> @llvm.sqrt.nxv2f64(<vscale x 2 x double> %a) 45; SIZE_LATE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret <vscale x 2 x double> %r 46; 47 %r = call <vscale x 2 x double> @llvm.sqrt.v2f64(<vscale x 2 x double> %a) 48 ret <vscale x 2 x double> %r 49} 50