11f73f0c1SDaniil Fukalov; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py 23a2ef3a6SMatt Arsenault; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx1010 -mattr=+half-rate-64-ops < %s | FileCheck -check-prefix=FAST %s 33a2ef3a6SMatt Arsenault; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx90a -mattr=+half-rate-64-ops < %s | FileCheck -check-prefixes=FAST %s 44178e334SSimon Pilgrim; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa < %s | FileCheck -check-prefixes=SLOW %s 558578f70SStanislav Mekhanoshin 63a2ef3a6SMatt Arsenault; RUN: opt -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx1010 -mattr=+half-rate-64-ops < %s | FileCheck -check-prefix=FAST-SIZE %s 73a2ef3a6SMatt Arsenault; RUN: opt -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa -mcpu=gfx90a -mattr=+half-rate-64-ops < %s | FileCheck -check-prefix=FAST-SIZE %s 83a2ef3a6SMatt Arsenault; RUN: opt -passes="print<cost-model>" -cost-kind=code-size 2>&1 -disable-output -mtriple=amdgcn-unknown-amdhsa < %s | FileCheck -check-prefix=SLOW-SIZE %s 958578f70SStanislav Mekhanoshin 1058578f70SStanislav Mekhanoshin 113a2ef3a6SMatt Arsenaultdefine void @fma_f16() { 12e5c64b45SDaniil Fukalov; FAST-LABEL: 'fma_f16' 13*4ed66cb4SMatt Arsenault; FAST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f16 = call half @llvm.fma.f16(half undef, half undef, half undef) 14*4ed66cb4SMatt Arsenault; FAST-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16 = call <2 x half> @llvm.fma.v2f16(<2 x half> undef, <2 x half> undef, <2 x half> undef) 15*4ed66cb4SMatt Arsenault; FAST-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v3f16 = call <3 x half> @llvm.fma.v3f16(<3 x half> undef, <3 x half> undef, <3 x half> undef) 16*4ed66cb4SMatt Arsenault; FAST-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f16 = call <4 x half> @llvm.fma.v4f16(<4 x half> undef, <4 x half> undef, <4 x half> undef) 17*4ed66cb4SMatt Arsenault; FAST-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v5f16 = call <5 x half> @llvm.fma.v5f16(<5 x half> undef, <5 x half> undef, <5 x half> undef) 18*4ed66cb4SMatt Arsenault; FAST-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v16f16 = call <16 x half> @llvm.fma.v16f16(<16 x half> undef, <16 x half> undef, <16 x half> undef) 19*4ed66cb4SMatt Arsenault; FAST-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %v17f16 = call <17 x half> @llvm.fma.v17f16(<17 x half> undef, <17 x half> undef, <17 x half> undef) 20e5c64b45SDaniil Fukalov; FAST-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void 211f73f0c1SDaniil Fukalov; 221f73f0c1SDaniil Fukalov; SLOW-LABEL: 'fma_f16' 233a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f16 = call half @llvm.fma.f16(half undef, half undef, half undef) 243a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v2f16 = call <2 x half> @llvm.fma.v2f16(<2 x half> undef, <2 x half> undef, <2 x half> undef) 253a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v3f16 = call <3 x half> @llvm.fma.v3f16(<3 x half> undef, <3 x half> undef, <3 x half> undef) 263a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v4f16 = call <4 x half> @llvm.fma.v4f16(<4 x half> undef, <4 x half> undef, <4 x half> undef) 273a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v5f16 = call <5 x half> @llvm.fma.v5f16(<5 x half> undef, <5 x half> undef, <5 x half> undef) 283a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %v16f16 = call <16 x half> @llvm.fma.v16f16(<16 x half> undef, <16 x half> undef, <16 x half> undef) 293a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 136 for instruction: %v17f16 = call <17 x half> @llvm.fma.v17f16(<17 x half> undef, <17 x half> undef, <17 x half> undef) 301f73f0c1SDaniil Fukalov; SLOW-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void 311f73f0c1SDaniil Fukalov; 32e5c64b45SDaniil Fukalov; FAST-SIZE-LABEL: 'fma_f16' 33*4ed66cb4SMatt Arsenault; FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f16 = call half @llvm.fma.f16(half undef, half undef, half undef) 34*4ed66cb4SMatt Arsenault; FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2f16 = call <2 x half> @llvm.fma.v2f16(<2 x half> undef, <2 x half> undef, <2 x half> undef) 35*4ed66cb4SMatt Arsenault; FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v3f16 = call <3 x half> @llvm.fma.v3f16(<3 x half> undef, <3 x half> undef, <3 x half> undef) 36*4ed66cb4SMatt Arsenault; FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4f16 = call <4 x half> @llvm.fma.v4f16(<4 x half> undef, <4 x half> undef, <4 x half> undef) 37*4ed66cb4SMatt Arsenault; FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v5f16 = call <5 x half> @llvm.fma.v5f16(<5 x half> undef, <5 x half> undef, <5 x half> undef) 38*4ed66cb4SMatt Arsenault; FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v16f16 = call <16 x half> @llvm.fma.v16f16(<16 x half> undef, <16 x half> undef, <16 x half> undef) 39*4ed66cb4SMatt Arsenault; FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %v17f16 = call <17 x half> @llvm.fma.v17f16(<17 x half> undef, <17 x half> undef, <17 x half> undef) 40e5c64b45SDaniil Fukalov; FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void 411f73f0c1SDaniil Fukalov; 421f73f0c1SDaniil Fukalov; SLOW-SIZE-LABEL: 'fma_f16' 433a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f16 = call half @llvm.fma.f16(half undef, half undef, half undef) 443a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f16 = call <2 x half> @llvm.fma.v2f16(<2 x half> undef, <2 x half> undef, <2 x half> undef) 453a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v3f16 = call <3 x half> @llvm.fma.v3f16(<3 x half> undef, <3 x half> undef, <3 x half> undef) 463a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f16 = call <4 x half> @llvm.fma.v4f16(<4 x half> undef, <4 x half> undef, <4 x half> undef) 473a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v5f16 = call <5 x half> @llvm.fma.v5f16(<5 x half> undef, <5 x half> undef, <5 x half> undef) 483a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16f16 = call <16 x half> @llvm.fma.v16f16(<16 x half> undef, <16 x half> undef, <16 x half> undef) 493a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 68 for instruction: %v17f16 = call <17 x half> @llvm.fma.v17f16(<17 x half> undef, <17 x half> undef, <17 x half> undef) 501f73f0c1SDaniil Fukalov; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void 511f73f0c1SDaniil Fukalov; 523a2ef3a6SMatt Arsenault %f16 = call half @llvm.fma.f16(half undef, half undef, half undef) 533a2ef3a6SMatt Arsenault %v2f16 = call <2 x half> @llvm.fma.v2f16(<2 x half> undef, <2 x half> undef, <2 x half> undef) 543a2ef3a6SMatt Arsenault %v3f16 = call <3 x half> @llvm.fma.v3f16(<3 x half> undef, <3 x half> undef, <3 x half> undef) 553a2ef3a6SMatt Arsenault %v4f16 = call <4 x half> @llvm.fma.v4f16(<4 x half> undef, <4 x half> undef, <4 x half> undef) 563a2ef3a6SMatt Arsenault %v5f16 = call <5 x half> @llvm.fma.v5f16(<5 x half> undef, <5 x half> undef, <5 x half> undef) 573a2ef3a6SMatt Arsenault %v16f16 = call <16 x half> @llvm.fma.v16f16(<16 x half> undef, <16 x half> undef, <16 x half> undef) 583a2ef3a6SMatt Arsenault %v17f16 = call <17 x half> @llvm.fma.v17f16(<17 x half> undef, <17 x half> undef, <17 x half> undef) 5958578f70SStanislav Mekhanoshin ret void 6058578f70SStanislav Mekhanoshin} 6158578f70SStanislav Mekhanoshin 623a2ef3a6SMatt Arsenaultdefine void @fma_bf16() { 633a2ef3a6SMatt Arsenault; FAST-LABEL: 'fma_bf16' 643a2ef3a6SMatt Arsenault; FAST-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %bf16 = call bfloat @llvm.fma.bf16(bfloat undef, bfloat undef, bfloat undef) 653a2ef3a6SMatt Arsenault; FAST-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2bf16 = call <2 x bfloat> @llvm.fma.v2bf16(<2 x bfloat> undef, <2 x bfloat> undef, <2 x bfloat> undef) 663a2ef3a6SMatt Arsenault; FAST-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v3bf16 = call <3 x bfloat> @llvm.fma.v3bf16(<3 x bfloat> undef, <3 x bfloat> undef, <3 x bfloat> undef) 673a2ef3a6SMatt Arsenault; FAST-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4bf16 = call <4 x bfloat> @llvm.fma.v4bf16(<4 x bfloat> undef, <4 x bfloat> undef, <4 x bfloat> undef) 683a2ef3a6SMatt Arsenault; FAST-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v5bf16 = call <5 x bfloat> @llvm.fma.v5bf16(<5 x bfloat> undef, <5 x bfloat> undef, <5 x bfloat> undef) 693a2ef3a6SMatt Arsenault; FAST-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16bf16 = call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> undef, <16 x bfloat> undef, <16 x bfloat> undef) 703a2ef3a6SMatt Arsenault; FAST-NEXT: Cost Model: Found an estimated cost of 192 for instruction: %v17bf16 = call <17 x bfloat> @llvm.fma.v17bf16(<17 x bfloat> undef, <17 x bfloat> undef, <17 x bfloat> undef) 713a2ef3a6SMatt Arsenault; FAST-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void 723a2ef3a6SMatt Arsenault; 733a2ef3a6SMatt Arsenault; SLOW-LABEL: 'fma_bf16' 743a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %bf16 = call bfloat @llvm.fma.bf16(bfloat undef, bfloat undef, bfloat undef) 753a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v2bf16 = call <2 x bfloat> @llvm.fma.v2bf16(<2 x bfloat> undef, <2 x bfloat> undef, <2 x bfloat> undef) 763a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v3bf16 = call <3 x bfloat> @llvm.fma.v3bf16(<3 x bfloat> undef, <3 x bfloat> undef, <3 x bfloat> undef) 773a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v4bf16 = call <4 x bfloat> @llvm.fma.v4bf16(<4 x bfloat> undef, <4 x bfloat> undef, <4 x bfloat> undef) 783a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v5bf16 = call <5 x bfloat> @llvm.fma.v5bf16(<5 x bfloat> undef, <5 x bfloat> undef, <5 x bfloat> undef) 793a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %v16bf16 = call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> undef, <16 x bfloat> undef, <16 x bfloat> undef) 803a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 136 for instruction: %v17bf16 = call <17 x bfloat> @llvm.fma.v17bf16(<17 x bfloat> undef, <17 x bfloat> undef, <17 x bfloat> undef) 813a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void 823a2ef3a6SMatt Arsenault; 833a2ef3a6SMatt Arsenault; FAST-SIZE-LABEL: 'fma_bf16' 843a2ef3a6SMatt Arsenault; FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %bf16 = call bfloat @llvm.fma.bf16(bfloat undef, bfloat undef, bfloat undef) 853a2ef3a6SMatt Arsenault; FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2bf16 = call <2 x bfloat> @llvm.fma.v2bf16(<2 x bfloat> undef, <2 x bfloat> undef, <2 x bfloat> undef) 863a2ef3a6SMatt Arsenault; FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v3bf16 = call <3 x bfloat> @llvm.fma.v3bf16(<3 x bfloat> undef, <3 x bfloat> undef, <3 x bfloat> undef) 873a2ef3a6SMatt Arsenault; FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4bf16 = call <4 x bfloat> @llvm.fma.v4bf16(<4 x bfloat> undef, <4 x bfloat> undef, <4 x bfloat> undef) 883a2ef3a6SMatt Arsenault; FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v5bf16 = call <5 x bfloat> @llvm.fma.v5bf16(<5 x bfloat> undef, <5 x bfloat> undef, <5 x bfloat> undef) 893a2ef3a6SMatt Arsenault; FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16bf16 = call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> undef, <16 x bfloat> undef, <16 x bfloat> undef) 903a2ef3a6SMatt Arsenault; FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 192 for instruction: %v17bf16 = call <17 x bfloat> @llvm.fma.v17bf16(<17 x bfloat> undef, <17 x bfloat> undef, <17 x bfloat> undef) 913a2ef3a6SMatt Arsenault; FAST-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void 923a2ef3a6SMatt Arsenault; 933a2ef3a6SMatt Arsenault; SLOW-SIZE-LABEL: 'fma_bf16' 943a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %bf16 = call bfloat @llvm.fma.bf16(bfloat undef, bfloat undef, bfloat undef) 953a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2bf16 = call <2 x bfloat> @llvm.fma.v2bf16(<2 x bfloat> undef, <2 x bfloat> undef, <2 x bfloat> undef) 963a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v3bf16 = call <3 x bfloat> @llvm.fma.v3bf16(<3 x bfloat> undef, <3 x bfloat> undef, <3 x bfloat> undef) 973a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4bf16 = call <4 x bfloat> @llvm.fma.v4bf16(<4 x bfloat> undef, <4 x bfloat> undef, <4 x bfloat> undef) 983a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v5bf16 = call <5 x bfloat> @llvm.fma.v5bf16(<5 x bfloat> undef, <5 x bfloat> undef, <5 x bfloat> undef) 993a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v16bf16 = call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> undef, <16 x bfloat> undef, <16 x bfloat> undef) 1003a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 68 for instruction: %v17bf16 = call <17 x bfloat> @llvm.fma.v17bf16(<17 x bfloat> undef, <17 x bfloat> undef, <17 x bfloat> undef) 1013a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void 1023a2ef3a6SMatt Arsenault; 1033a2ef3a6SMatt Arsenault %bf16 = call bfloat @llvm.fma.bf16(bfloat undef, bfloat undef, bfloat undef) 1043a2ef3a6SMatt Arsenault %v2bf16 = call <2 x bfloat> @llvm.fma.v2bf16(<2 x bfloat> undef, <2 x bfloat> undef, <2 x bfloat> undef) 1053a2ef3a6SMatt Arsenault %v3bf16 = call <3 x bfloat> @llvm.fma.v3bf16(<3 x bfloat> undef, <3 x bfloat> undef, <3 x bfloat> undef) 1063a2ef3a6SMatt Arsenault %v4bf16 = call <4 x bfloat> @llvm.fma.v4bf16(<4 x bfloat> undef, <4 x bfloat> undef, <4 x bfloat> undef) 1073a2ef3a6SMatt Arsenault %v5bf16 = call <5 x bfloat> @llvm.fma.v5bf16(<5 x bfloat> undef, <5 x bfloat> undef, <5 x bfloat> undef) 1083a2ef3a6SMatt Arsenault %v16bf16 = call <16 x bfloat> @llvm.fma.v16bf16(<16 x bfloat> undef, <16 x bfloat> undef, <16 x bfloat> undef) 1093a2ef3a6SMatt Arsenault %v17bf16 = call <17 x bfloat> @llvm.fma.v17bf16(<17 x bfloat> undef, <17 x bfloat> undef, <17 x bfloat> undef) 1103a2ef3a6SMatt Arsenault ret void 1113a2ef3a6SMatt Arsenault} 11258578f70SStanislav Mekhanoshin 1133a2ef3a6SMatt Arsenaultdefine void @fma_f32() { 1143a2ef3a6SMatt Arsenault; SLOW-LABEL: 'fma_f32' 1153a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f32 = call float @llvm.fma.f32(float undef, float undef, float undef) 1163a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v2f32 = call <2 x float> @llvm.fma.v2f32(<2 x float> undef, <2 x float> undef, <2 x float> undef) 1173a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %v3f32 = call <3 x float> @llvm.fma.v3f32(<3 x float> undef, <3 x float> undef, <3 x float> undef) 1183a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v4f32 = call <4 x float> @llvm.fma.v4f32(<4 x float> undef, <4 x float> undef, <4 x float> undef) 1193a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %v5f32 = call <5 x float> @llvm.fma.v5f32(<5 x float> undef, <5 x float> undef, <5 x float> undef) 1203a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v8f32 = call <8 x float> @llvm.fma.v8f32(<8 x float> undef, <8 x float> undef, <8 x float> undef) 1213a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 108 for instruction: %v9f32 = call <9 x float> @llvm.fma.v9f32(<9 x float> undef, <9 x float> undef, <9 x float> undef) 1223a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void 1233a2ef3a6SMatt Arsenault; 1243a2ef3a6SMatt Arsenault; SLOW-SIZE-LABEL: 'fma_f32' 1253a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f32 = call float @llvm.fma.f32(float undef, float undef, float undef) 1263a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f32 = call <2 x float> @llvm.fma.v2f32(<2 x float> undef, <2 x float> undef, <2 x float> undef) 1273a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v3f32 = call <3 x float> @llvm.fma.v3f32(<3 x float> undef, <3 x float> undef, <3 x float> undef) 1283a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f32 = call <4 x float> @llvm.fma.v4f32(<4 x float> undef, <4 x float> undef, <4 x float> undef) 1293a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %v5f32 = call <5 x float> @llvm.fma.v5f32(<5 x float> undef, <5 x float> undef, <5 x float> undef) 1303a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v8f32 = call <8 x float> @llvm.fma.v8f32(<8 x float> undef, <8 x float> undef, <8 x float> undef) 1313a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 54 for instruction: %v9f32 = call <9 x float> @llvm.fma.v9f32(<9 x float> undef, <9 x float> undef, <9 x float> undef) 1323a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void 1333a2ef3a6SMatt Arsenault; 1343a2ef3a6SMatt Arsenault %f32 = call float @llvm.fma.f32(float undef, float undef, float undef) 1353a2ef3a6SMatt Arsenault %v2f32 = call <2 x float> @llvm.fma.v2f32(<2 x float> undef, <2 x float> undef, <2 x float> undef) 1363a2ef3a6SMatt Arsenault %v3f32 = call <3 x float> @llvm.fma.v3f32(<3 x float> undef, <3 x float> undef, <3 x float> undef) 1373a2ef3a6SMatt Arsenault %v4f32 = call <4 x float> @llvm.fma.v4f32(<4 x float> undef, <4 x float> undef, <4 x float> undef) 1383a2ef3a6SMatt Arsenault %v5f32 = call <5 x float> @llvm.fma.v5f32(<5 x float> undef, <5 x float> undef, <5 x float> undef) 1393a2ef3a6SMatt Arsenault %v8f32 = call <8 x float> @llvm.fma.v8f32(<8 x float> undef, <8 x float> undef, <8 x float> undef) 1403a2ef3a6SMatt Arsenault %v9f32 = call <9 x float> @llvm.fma.v9f32(<9 x float> undef, <9 x float> undef, <9 x float> undef) 1413a2ef3a6SMatt Arsenault ret void 1423a2ef3a6SMatt Arsenault} 14358578f70SStanislav Mekhanoshin 1443a2ef3a6SMatt Arsenaultdefine void @fma_f64() { 1453a2ef3a6SMatt Arsenault; SLOW-LABEL: 'fma_f64' 1463a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f64 = call double @llvm.fma.f64(double undef, double undef, double undef) 1473a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v2f64 = call <2 x double> @llvm.fma.v2f64(<2 x double> undef, <2 x double> undef, <2 x double> undef) 1483a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %v3f64 = call <3 x double> @llvm.fma.v3f64(<3 x double> undef, <3 x double> undef, <3 x double> undef) 1493a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %v4f64 = call <4 x double> @llvm.fma.v4f64(<4 x double> undef, <4 x double> undef, <4 x double> undef) 1503a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 96 for instruction: %v5f64 = call <5 x double> @llvm.fma.v5f64(<5 x double> undef, <5 x double> undef, <5 x double> undef) 1513a2ef3a6SMatt Arsenault; SLOW-NEXT: Cost Model: Found an estimated cost of 10 for instruction: ret void 1523a2ef3a6SMatt Arsenault; 1533a2ef3a6SMatt Arsenault; SLOW-SIZE-LABEL: 'fma_f64' 1543a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f64 = call double @llvm.fma.f64(double undef, double undef, double undef) 1553a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v2f64 = call <2 x double> @llvm.fma.v2f64(<2 x double> undef, <2 x double> undef, <2 x double> undef) 1563a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 6 for instruction: %v3f64 = call <3 x double> @llvm.fma.v3f64(<3 x double> undef, <3 x double> undef, <3 x double> undef) 1573a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v4f64 = call <4 x double> @llvm.fma.v4f64(<4 x double> undef, <4 x double> undef, <4 x double> undef) 1583a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %v5f64 = call <5 x double> @llvm.fma.v5f64(<5 x double> undef, <5 x double> undef, <5 x double> undef) 1593a2ef3a6SMatt Arsenault; SLOW-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret void 1603a2ef3a6SMatt Arsenault; 1613a2ef3a6SMatt Arsenault %f64 = call double @llvm.fma.f64(double undef, double undef, double undef) 1623a2ef3a6SMatt Arsenault %v2f64 = call <2 x double> @llvm.fma.v2f64(<2 x double> undef, <2 x double> undef, <2 x double> undef) 1633a2ef3a6SMatt Arsenault %v3f64 = call <3 x double> @llvm.fma.v3f64(<3 x double> undef, <3 x double> undef, <3 x double> undef) 1643a2ef3a6SMatt Arsenault %v4f64 = call <4 x double> @llvm.fma.v4f64(<4 x double> undef, <4 x double> undef, <4 x double> undef) 1653a2ef3a6SMatt Arsenault %v5f64 = call <5 x double> @llvm.fma.v5f64(<5 x double> undef, <5 x double> undef, <5 x double> undef) 1663a2ef3a6SMatt Arsenault ret void 1673a2ef3a6SMatt Arsenault} 168