brintos

brintos / llvm-project-archived public Read only

0
0
Text · 11.4 KiB · 9894fb9 Raw
188 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py2; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -mattr=+vsx | FileCheck --check-prefix=CHECK-P7 %s3; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr8 -mattr=+vsx | FileCheck --check-prefix=CHECK-P8LE %s4; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr9 -mattr=+vsx | FileCheck --check-prefix=CHECK-P9BE %s5; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=powerpc64le-unknown-linux-gnu -mcpu=pwr9 -mattr=+vsx | FileCheck --check-prefix=CHECK-P9LE %s6 7target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"8target triple = "powerpc64-unknown-linux-gnu"9 10define i32 @insert(i32 %arg) {11  ; CHECK: cost of 10 {{.*}} insertelement12; CHECK-P7-LABEL: 'insert'13; CHECK-P7-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %x = insertelement <4 x i32> poison, i32 %arg, i32 014; CHECK-P7-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef15;16; CHECK-P8LE-LABEL: 'insert'17; CHECK-P8LE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %x = insertelement <4 x i32> poison, i32 %arg, i32 018; CHECK-P8LE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef19;20; CHECK-P9BE-LABEL: 'insert'21; CHECK-P9BE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %x = insertelement <4 x i32> poison, i32 %arg, i32 022; CHECK-P9BE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef23;24; CHECK-P9LE-LABEL: 'insert'25; CHECK-P9LE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %x = insertelement <4 x i32> poison, i32 %arg, i32 026; CHECK-P9LE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef27;28  %x = insertelement <4 x i32> poison, i32 %arg, i32 029  ret i32 undef30}31 32define i32 @extract(<4 x i32> %arg) {33  ; CHECK: cost of 3 {{.*}} extractelement34; CHECK-P7-LABEL: 'extract'35; CHECK-P7-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <4 x i32> %arg, i32 036; CHECK-P7-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x37;38; CHECK-P8LE-LABEL: 'extract'39; CHECK-P8LE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %x = extractelement <4 x i32> %arg, i32 040; CHECK-P8LE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x41;42; CHECK-P9BE-LABEL: 'extract'43; CHECK-P9BE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %x = extractelement <4 x i32> %arg, i32 044; CHECK-P9BE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x45;46; CHECK-P9LE-LABEL: 'extract'47; CHECK-P9LE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %x = extractelement <4 x i32> %arg, i32 048; CHECK-P9LE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret i32 %x49;50  %x = extractelement <4 x i32> %arg, i32 051  ret i32 %x52}53 54define void @test2xdouble(<2 x double> %arg1) {55; CHECK-P7-LABEL: 'test2xdouble'56; CHECK-P7-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v1 = extractelement <2 x double> %arg1, i32 057; CHECK-P7-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v2 = extractelement <2 x double> %arg1, i32 158; CHECK-P7-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void59;60; CHECK-P8LE-LABEL: 'test2xdouble'61; CHECK-P8LE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %v1 = extractelement <2 x double> %arg1, i32 062; CHECK-P8LE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2 = extractelement <2 x double> %arg1, i32 163; CHECK-P8LE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void64;65; CHECK-P9BE-LABEL: 'test2xdouble'66; CHECK-P9BE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v1 = extractelement <2 x double> %arg1, i32 067; CHECK-P9BE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v2 = extractelement <2 x double> %arg1, i32 168; CHECK-P9BE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void69;70; CHECK-P9LE-LABEL: 'test2xdouble'71; CHECK-P9LE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %v1 = extractelement <2 x double> %arg1, i32 072; CHECK-P9LE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: %v2 = extractelement <2 x double> %arg1, i32 173; CHECK-P9LE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void74;75  %v1 = extractelement <2 x double> %arg1, i32 076  %v2 = extractelement <2 x double> %arg1, i32 177  ret void78}79 80define void @test4xi32(<4 x i32> %v1, i32 %x1) {81; CHECK-P7-LABEL: 'test4xi32'82; CHECK-P7-NEXT:  Cost Model: Found an estimated cost of 10 for instruction: %v2 = insertelement <4 x i32> %v1, i32 %x1, i32 283; CHECK-P7-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void84;85; CHECK-P8LE-LABEL: 'test4xi32'86; CHECK-P8LE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %v2 = insertelement <4 x i32> %v1, i32 %x1, i32 287; CHECK-P8LE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void88;89; CHECK-P9BE-LABEL: 'test4xi32'90; CHECK-P9BE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v2 = insertelement <4 x i32> %v1, i32 %x1, i32 291; CHECK-P9BE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void92;93; CHECK-P9LE-LABEL: 'test4xi32'94; CHECK-P9LE-NEXT:  Cost Model: Found an estimated cost of 4 for instruction: %v2 = insertelement <4 x i32> %v1, i32 %x1, i32 295; CHECK-P9LE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void96;97  %v2 = insertelement <4 x i32> %v1, i32 %x1, i32 298  ret void99}100 101define void @vexti32(<4 x i32> %p1) {102; CHECK-P7-LABEL: 'vexti32'103; CHECK-P7-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %i1 = extractelement <4 x i32> %p1, i32 0104; CHECK-P7-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %i2 = extractelement <4 x i32> %p1, i32 1105; CHECK-P7-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %i3 = extractelement <4 x i32> %p1, i32 2106; CHECK-P7-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %i4 = extractelement <4 x i32> %p1, i32 3107; CHECK-P7-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void108;109; CHECK-P8LE-LABEL: 'vexti32'110; CHECK-P8LE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %i1 = extractelement <4 x i32> %p1, i32 0111; CHECK-P8LE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %i2 = extractelement <4 x i32> %p1, i32 1112; CHECK-P8LE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %i3 = extractelement <4 x i32> %p1, i32 2113; CHECK-P8LE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %i4 = extractelement <4 x i32> %p1, i32 3114; CHECK-P8LE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void115;116; CHECK-P9BE-LABEL: 'vexti32'117; CHECK-P9BE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %i1 = extractelement <4 x i32> %p1, i32 0118; CHECK-P9BE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i2 = extractelement <4 x i32> %p1, i32 1119; CHECK-P9BE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %i3 = extractelement <4 x i32> %p1, i32 2120; CHECK-P9BE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %i4 = extractelement <4 x i32> %p1, i32 3121; CHECK-P9BE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void122;123; CHECK-P9LE-LABEL: 'vexti32'124; CHECK-P9LE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %i1 = extractelement <4 x i32> %p1, i32 0125; CHECK-P9LE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %i2 = extractelement <4 x i32> %p1, i32 1126; CHECK-P9LE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i3 = extractelement <4 x i32> %p1, i32 2127; CHECK-P9LE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %i4 = extractelement <4 x i32> %p1, i32 3128; CHECK-P9LE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void129;130  %i1 = extractelement <4 x i32> %p1, i32 0131  %i2 = extractelement <4 x i32> %p1, i32 1132  %i3 = extractelement <4 x i32> %p1, i32 2133  %i4 = extractelement <4 x i32> %p1, i32 3134  ret void135}136 137define void @vexti64(<2 x i64> %p1) {138; CHECK-P7-LABEL: 'vexti64'139; CHECK-P7-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %i1 = extractelement <2 x i64> %p1, i32 0140; CHECK-P7-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %i2 = extractelement <2 x i64> %p1, i32 1141; CHECK-P7-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void142;143; CHECK-P8LE-LABEL: 'vexti64'144; CHECK-P8LE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %i1 = extractelement <2 x i64> %p1, i32 0145; CHECK-P8LE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %i2 = extractelement <2 x i64> %p1, i32 1146; CHECK-P8LE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void147;148; CHECK-P9BE-LABEL: 'vexti64'149; CHECK-P9BE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i1 = extractelement <2 x i64> %p1, i32 0150; CHECK-P9BE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i2 = extractelement <2 x i64> %p1, i32 1151; CHECK-P9BE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void152;153; CHECK-P9LE-LABEL: 'vexti64'154; CHECK-P9LE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i1 = extractelement <2 x i64> %p1, i32 0155; CHECK-P9LE-NEXT:  Cost Model: Found an estimated cost of 1 for instruction: %i2 = extractelement <2 x i64> %p1, i32 1156; CHECK-P9LE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void157;158  %i1 = extractelement <2 x i64> %p1, i32 0159  %i2 = extractelement <2 x i64> %p1, i32 1160  ret void161}162 163define void @vext(<8 x i16> %p1, <16 x i8> %p2) {164; CHECK-P7-LABEL: 'vext'165; CHECK-P7-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %i1 = extractelement <8 x i16> %p1, i32 0166; CHECK-P7-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %i2 = extractelement <16 x i8> %p2, i32 0167; CHECK-P7-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void168;169; CHECK-P8LE-LABEL: 'vext'170; CHECK-P8LE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %i1 = extractelement <8 x i16> %p1, i32 0171; CHECK-P8LE-NEXT:  Cost Model: Found an estimated cost of 3 for instruction: %i2 = extractelement <16 x i8> %p2, i32 0172; CHECK-P8LE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void173;174; CHECK-P9BE-LABEL: 'vext'175; CHECK-P9BE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %i1 = extractelement <8 x i16> %p1, i32 0176; CHECK-P9BE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %i2 = extractelement <16 x i8> %p2, i32 0177; CHECK-P9BE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void178;179; CHECK-P9LE-LABEL: 'vext'180; CHECK-P9LE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %i1 = extractelement <8 x i16> %p1, i32 0181; CHECK-P9LE-NEXT:  Cost Model: Found an estimated cost of 2 for instruction: %i2 = extractelement <16 x i8> %p2, i32 0182; CHECK-P9LE-NEXT:  Cost Model: Found an estimated cost of 0 for instruction: ret void183;184  %i1 = extractelement <8 x i16> %p1, i32 0185  %i2 = extractelement <16 x i8> %p2, i32 0186  ret void187}188