brintos

brintos / llvm-project-archived public Read only

0
0
Text · 8.9 KiB · cef6cf1 Raw
133 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py2; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output | FileCheck %s3; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mcpu=neoverse-n1 | FileCheck %s4; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mcpu=neoverse-n2 | FileCheck %s5; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mcpu=neoverse-v1 | FileCheck %s6; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mcpu=neoverse-v2 | FileCheck %s7; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mcpu=kryo | FileCheck %s8 9target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"10target triple = "aarch64--linux-gnu"11 12define void @vectorInstrCost() {13; CHECK-LABEL: 'vectorInstrCost'14; CHECK-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:2 Lat:3 SizeLat:3 for: %ta0 = extractelement <8 x i1> undef, i32 015; CHECK-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:2 Lat:3 SizeLat:3 for: %ta1 = extractelement <8 x i1> undef, i32 116; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t1 = extractelement <8 x i8> undef, i32 017; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t2 = extractelement <8 x i8> undef, i32 118; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t3 = extractelement <4 x i16> undef, i32 019; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t4 = extractelement <4 x i16> undef, i32 120; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t5 = extractelement <2 x i32> undef, i32 021; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t6 = extractelement <2 x i32> undef, i32 122; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t7 = extractelement <2 x i64> undef, i32 023; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t8 = extractelement <2 x i64> undef, i32 124; CHECK-NEXT:  Cost Model: Found costs of 0 for: %t9 = extractelement <4 x half> undef, i32 025; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t10 = extractelement <4 x half> undef, i32 126; CHECK-NEXT:  Cost Model: Found costs of 0 for: %t11 = extractelement <2 x float> undef, i32 027; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t12 = extractelement <2 x float> undef, i32 128; CHECK-NEXT:  Cost Model: Found costs of 0 for: %t13 = extractelement <2 x double> undef, i32 029; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t14 = extractelement <2 x double> undef, i32 130; CHECK-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:2 Lat:3 SizeLat:3 for: %t31 = insertelement <8 x i1> undef, i1 false, i32 031; CHECK-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:2 Lat:3 SizeLat:3 for: %t41 = insertelement <8 x i1> undef, i1 true, i32 132; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t30 = insertelement <8 x i8> undef, i8 0, i32 033; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t40 = insertelement <8 x i8> undef, i8 1, i32 134; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t50 = insertelement <4 x i16> undef, i16 2, i32 035; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t60 = insertelement <4 x i16> undef, i16 3, i32 136; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t70 = insertelement <2 x i32> undef, i32 4, i32 037; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t80 = insertelement <2 x i32> undef, i32 5, i32 138; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t90 = insertelement <2 x i64> undef, i64 6, i32 039; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t100 = insertelement <2 x i64> undef, i64 7, i32 140; CHECK-NEXT:  Cost Model: Found costs of 0 for: %t110 = insertelement <4 x half> zeroinitializer, half 0xH0000, i64 041; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t120 = insertelement <4 x half> zeroinitializer, half 0xH0000, i64 142; CHECK-NEXT:  Cost Model: Found costs of 0 for: %t130 = insertelement <2 x float> zeroinitializer, float 0.000000e+00, i64 043; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t140 = insertelement <2 x float> zeroinitializer, float 0.000000e+00, i64 144; CHECK-NEXT:  Cost Model: Found costs of 0 for: %t150 = insertelement <2 x double> zeroinitializer, double 0.000000e+00, i64 045; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %t160 = insertelement <2 x double> zeroinitializer, double 0.000000e+00, i64 146; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void47;48  %ta0 = extractelement <8 x i1> undef, i32 049  %ta1 = extractelement <8 x i1> undef, i32 150  %t1 = extractelement <8 x i8> undef, i32 051  %t2 = extractelement <8 x i8> undef, i32 152  %t3 = extractelement <4 x i16> undef, i32 053  %t4 = extractelement <4 x i16> undef, i32 154  %t5 = extractelement <2 x i32> undef, i32 055  %t6 = extractelement <2 x i32> undef, i32 156  %t7 = extractelement <2 x i64> undef, i32 057  %t8 = extractelement <2 x i64> undef, i32 158  %t9 = extractelement <4 x half> undef, i32 059  %t10 = extractelement <4 x half> undef, i32 160  %t11 = extractelement <2 x float> undef, i32 061  %t12 = extractelement <2 x float> undef, i32 162  %t13 = extractelement <2 x double> undef, i32 063  %t14 = extractelement <2 x double> undef, i32 164 65  %t31 = insertelement <8 x i1> undef, i1 0, i32 066  %t41 = insertelement <8 x i1> undef, i1 1, i32 167  %t30 = insertelement <8 x i8> undef, i8 0, i32 068  %t40 = insertelement <8 x i8> undef, i8 1, i32 169  %t50 = insertelement <4 x i16> undef, i16 2, i32 070  %t60 = insertelement <4 x i16> undef, i16 3, i32 171  %t70 = insertelement <2 x i32> undef, i32 4, i32 072  %t80 = insertelement <2 x i32> undef, i32 5, i32 173  %t90 = insertelement <2 x i64> undef, i64 6, i32 074  %t100 = insertelement <2 x i64> undef, i64 7, i32 175  %t110 = insertelement <4 x half> zeroinitializer, half 0.000000e+00, i64 076  %t120 = insertelement <4 x half> zeroinitializer, half 0.000000e+00, i64 177  %t130 = insertelement <2 x float> zeroinitializer, float 0.000000e+00, i64 078  %t140 = insertelement <2 x float> zeroinitializer, float 0.000000e+00, i64 179  %t150 = insertelement <2 x double> zeroinitializer, double 0.000000e+00, i64 080  %t160 = insertelement <2 x double> zeroinitializer, double 0.000000e+00, i64 181  ret void82}83 84;; LD1: Load one single-element structure to one lane of one register.85 86define <8 x i8> @LD1_B(<8 x i8> %vec, ptr noundef %i) {87; CHECK-LABEL: 'LD1_B'88; CHECK-NEXT:  Cost Model: Found costs of RThru:1 CodeSize:1 Lat:4 SizeLat:1 for: %v1 = load i8, ptr %i, align 189; CHECK-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:0 Lat:3 SizeLat:3 for: %v2 = insertelement <8 x i8> %vec, i8 %v1, i32 190; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <8 x i8> %v291;92entry:93  %v1 = load i8, ptr %i, align 194  %v2 = insertelement <8 x i8> %vec, i8 %v1, i32 195  ret <8x i8> %v296}97 98define <4 x i16> @LD1_H(<4 x i16> %vec, ptr noundef %i) {99; CHECK-LABEL: 'LD1_H'100; CHECK-NEXT:  Cost Model: Found costs of RThru:1 CodeSize:1 Lat:4 SizeLat:1 for: %v1 = load i16, ptr %i, align 2101; CHECK-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:0 Lat:3 SizeLat:3 for: %v2 = insertelement <4 x i16> %vec, i16 %v1, i32 2102; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i16> %v2103;104entry:105  %v1 = load i16, ptr %i, align 2106  %v2 = insertelement <4 x i16> %vec, i16 %v1, i32 2107  ret <4 x i16> %v2108}109 110define <4 x i32> @LD1_W(<4 x i32> %vec, ptr noundef %i) {111; CHECK-LABEL: 'LD1_W'112; CHECK-NEXT:  Cost Model: Found costs of RThru:1 CodeSize:1 Lat:4 SizeLat:1 for: %v1 = load i32, ptr %i, align 4113; CHECK-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:0 Lat:3 SizeLat:3 for: %v2 = insertelement <4 x i32> %vec, i32 %v1, i32 3114; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <4 x i32> %v2115;116entry:117  %v1 = load i32, ptr %i, align 4118  %v2 = insertelement <4 x i32> %vec, i32 %v1, i32 3119  ret <4 x i32> %v2120}121 122define <2 x i64> @LD1_X(<2 x i64> %vec, ptr noundef %i) {123; CHECK-LABEL: 'LD1_X'124; CHECK-NEXT:  Cost Model: Found costs of RThru:1 CodeSize:1 Lat:4 SizeLat:1 for: %v1 = load i64, ptr %i, align 8125; CHECK-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:0 Lat:3 SizeLat:3 for: %v2 = insertelement <2 x i64> %vec, i64 %v1, i32 0126; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret <2 x i64> %v2127;128entry:129  %v1 = load i64, ptr %i, align 8130  %v2 = insertelement <2 x i64> %vec, i64 %v1, i32 0131  ret <2 x i64> %v2132}133