brintos

brintos / llvm-project-archived public Read only

0
0
Text · 9.5 KiB · 4d36c9e Raw
152 lines · plain
1; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=systemz-unknown -mcpu=zEC12 | FileCheck %s --check-prefixes=CHECK,ZEC122; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=systemz-unknown -mcpu=z13 | FileCheck %s --check-prefixes=CHECK,Z133; RUN: opt < %s -passes="print<cost-model>" 2>&1 -disable-output -mtriple=systemz-unknown -mcpu=z14 | FileCheck %s --check-prefixes=CHECK,Z144 5define void @store() {6  store i8 undef, ptr undef7  store i16 undef, ptr undef8  store i32 undef, ptr undef9  store i64 undef, ptr undef10  store i128 undef, ptr undef11  store float undef, ptr undef12  store double undef, ptr undef13  store fp128 undef, ptr undef14  store <2 x i8> undef, ptr undef15  store <2 x i16> undef, ptr undef16  store <2 x i32> undef, ptr undef17  store <2 x i64> undef, ptr undef18  store <2 x float> undef, ptr undef19  store <2 x double> undef, ptr undef20  store <4 x i8> undef, ptr undef21  store <4 x i16> undef, ptr undef22  store <4 x i32> undef, ptr undef23  store <4 x i64> undef, ptr undef24  store <4 x float> undef, ptr undef25  store <4 x double> undef, ptr undef26  store <8 x i8> undef, ptr undef27  store <8 x i16> undef, ptr undef28  store <8 x i32> undef, ptr undef29  store <8 x i64> undef, ptr undef30  store <8 x float> undef, ptr undef31  store <8 x double> undef, ptr undef32  store <16 x i8> undef, ptr undef33  store <16 x i16> undef, ptr undef34  store <16 x i32> undef, ptr undef35  store <16 x i64> undef, ptr undef36  store <16 x float> undef, ptr undef37  store <16 x double> undef, ptr undef38 39; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   store i8 undef, ptr undef40; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   store i16 undef, ptr undef41; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   store i32 undef, ptr undef42; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   store i64 undef, ptr undef43; ZEC12: Cost Model: Found an estimated cost of 2 for instruction:   store i128 undef, ptr undef44; Z13:   Cost Model: Found an estimated cost of 1 for instruction:   store i128 undef, ptr undef45; Z14:   Cost Model: Found an estimated cost of 1 for instruction:   store i128 undef, ptr undef46; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   store float undef, ptr undef47; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   store double undef, ptr undef48; ZEC12: Cost Model: Found an estimated cost of 2 for instruction:   store fp128 undef, ptr undef49; Z13:   Cost Model: Found an estimated cost of 2 for instruction:   store fp128 undef, ptr undef50; Z14:   Cost Model: Found an estimated cost of 1 for instruction:   store fp128 undef, ptr undef51; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   store <2 x i8> undef, ptr undef52; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   store <2 x i16> undef, ptr undef53; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   store <2 x i32> undef, ptr undef54; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   store <2 x i64> undef, ptr undef55; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   store <2 x float> undef, ptr undef56; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   store <2 x double> undef, ptr undef57; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   store <4 x i8> undef, ptr undef58; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   store <4 x i16> undef, ptr undef59; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   store <4 x i32> undef, ptr undef60; CHECK: Cost Model: Found an estimated cost of 2 for instruction:   store <4 x i64> undef, ptr undef61; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   store <4 x float> undef, ptr undef62; CHECK: Cost Model: Found an estimated cost of 2 for instruction:   store <4 x double> undef, ptr undef63; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   store <8 x i8> undef, ptr undef64; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   store <8 x i16> undef, ptr undef65; CHECK: Cost Model: Found an estimated cost of 2 for instruction:   store <8 x i32> undef, ptr undef66; CHECK: Cost Model: Found an estimated cost of 4 for instruction:   store <8 x i64> undef, ptr undef67; CHECK: Cost Model: Found an estimated cost of 2 for instruction:   store <8 x float> undef, ptr undef68; CHECK: Cost Model: Found an estimated cost of 4 for instruction:   store <8 x double> undef, ptr undef69; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   store <16 x i8> undef, ptr undef70; CHECK: Cost Model: Found an estimated cost of 2 for instruction:   store <16 x i16> undef, ptr undef71; CHECK: Cost Model: Found an estimated cost of 4 for instruction:   store <16 x i32> undef, ptr undef72; CHECK: Cost Model: Found an estimated cost of 8 for instruction:   store <16 x i64> undef, ptr undef73; CHECK: Cost Model: Found an estimated cost of 4 for instruction:   store <16 x float> undef, ptr undef74; CHECK: Cost Model: Found an estimated cost of 8 for instruction:   store <16 x double> undef, ptr undef75 76  ret void;77}78 79define void @load() {80  load i8, ptr undef81  load i16, ptr undef82  load i32, ptr undef83  load i64, ptr undef84  load i128, ptr undef85  load float, ptr undef86  load double, ptr undef87  load fp128, ptr undef88  load <2 x i8>, ptr undef89  load <2 x i16>, ptr undef90  load <2 x i32>, ptr undef91  load <2 x i64>, ptr undef92  load <2 x float>, ptr undef93  load <2 x double>, ptr undef94  load <4 x i8>, ptr undef95  load <4 x i16>, ptr undef96  load <4 x i32>, ptr undef97  load <4 x i64>, ptr undef98  load <4 x float>, ptr undef99  load <4 x double>, ptr undef100  load <8 x i8>, ptr undef101  load <8 x i16>, ptr undef102  load <8 x i32>, ptr undef103  load <8 x i64>, ptr undef104  load <8 x float>, ptr undef105  load <8 x double>, ptr undef106  load <16 x i8>, ptr undef107  load <16 x i16>, ptr undef108  load <16 x i32>, ptr undef109  load <16 x i64>, ptr undef110  load <16 x float>, ptr undef111  load <16 x double>, ptr undef112 113; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   %1 = load i8, ptr undef114; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   %2 = load i16, ptr undef115; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   %3 = load i32, ptr undef116; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   %4 = load i64, ptr undef117; ZEC12: Cost Model: Found an estimated cost of 2 for instruction:   %5 = load i128, ptr undef118; Z13:   Cost Model: Found an estimated cost of 1 for instruction:   %5 = load i128, ptr undef119; Z14:   Cost Model: Found an estimated cost of 1 for instruction:   %5 = load i128, ptr undef120; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   %6 = load float, ptr undef121; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   %7 = load double, ptr undef122; ZEC12: Cost Model: Found an estimated cost of 2 for instruction:   %8 = load fp128, ptr undef123; Z13:   Cost Model: Found an estimated cost of 2 for instruction:   %8 = load fp128, ptr undef124; Z14:   Cost Model: Found an estimated cost of 1 for instruction:   %8 = load fp128, ptr undef125; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   %9 = load <2 x i8>, ptr undef126; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   %10 = load <2 x i16>, ptr undef127; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   %11 = load <2 x i32>, ptr undef128; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   %12 = load <2 x i64>, ptr undef129; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   %13 = load <2 x float>, ptr undef130; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   %14 = load <2 x double>, ptr undef131; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   %15 = load <4 x i8>, ptr undef132; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   %16 = load <4 x i16>, ptr undef133; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   %17 = load <4 x i32>, ptr undef134; CHECK: Cost Model: Found an estimated cost of 2 for instruction:   %18 = load <4 x i64>, ptr undef135; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   %19 = load <4 x float>, ptr undef136; CHECK: Cost Model: Found an estimated cost of 2 for instruction:   %20 = load <4 x double>, ptr undef137; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   %21 = load <8 x i8>, ptr undef138; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   %22 = load <8 x i16>, ptr undef139; CHECK: Cost Model: Found an estimated cost of 2 for instruction:   %23 = load <8 x i32>, ptr undef140; CHECK: Cost Model: Found an estimated cost of 4 for instruction:   %24 = load <8 x i64>, ptr undef141; CHECK: Cost Model: Found an estimated cost of 2 for instruction:   %25 = load <8 x float>, ptr undef142; CHECK: Cost Model: Found an estimated cost of 4 for instruction:   %26 = load <8 x double>, ptr undef143; CHECK: Cost Model: Found an estimated cost of 1 for instruction:   %27 = load <16 x i8>, ptr undef144; CHECK: Cost Model: Found an estimated cost of 2 for instruction:   %28 = load <16 x i16>, ptr undef145; CHECK: Cost Model: Found an estimated cost of 4 for instruction:   %29 = load <16 x i32>, ptr undef146; CHECK: Cost Model: Found an estimated cost of 8 for instruction:   %30 = load <16 x i64>, ptr undef147; CHECK: Cost Model: Found an estimated cost of 4 for instruction:   %31 = load <16 x float>, ptr undef148; CHECK: Cost Model: Found an estimated cost of 8 for instruction:   %32 = load <16 x double>, ptr undef149 150  ret void;151}152