brintos

brintos / llvm-project-archived public Read only

0
0
Text · 8.8 KiB · f0e64b5 Raw
143 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py2; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=aarch64-- < %s | FileCheck %s3 4target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"5 6define void @cmps() {7; CHECK-LABEL: 'cmps'8; CHECK-NEXT:  Cost Model: Found costs of 1 for: %c8 = icmp slt i8 undef, undef9; CHECK-NEXT:  Cost Model: Found costs of 1 for: %c16 = icmp ult i16 undef, undef10; CHECK-NEXT:  Cost Model: Found costs of 1 for: %c32 = icmp sge i32 undef, undef11; CHECK-NEXT:  Cost Model: Found costs of 1 for: %c64 = icmp ne i64 undef, undef12; CHECK-NEXT:  Cost Model: Found costs of 2 for: %c128 = icmp ult i128 undef, undef13; CHECK-NEXT:  Cost Model: Found costs of 1 for: %cv16i8 = icmp slt <16 x i8> undef, undef14; CHECK-NEXT:  Cost Model: Found costs of 1 for: %cv8i16 = icmp ult <8 x i16> undef, undef15; CHECK-NEXT:  Cost Model: Found costs of 1 for: %cv4i32 = icmp sge <4 x i32> undef, undef16; CHECK-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:3 Lat:4 SizeLat:3 for: %cf16 = fcmp oge half undef, undef17; CHECK-NEXT:  Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:1 for: %cf32 = fcmp ogt float undef, undef18; CHECK-NEXT:  Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:1 for: %cf64 = fcmp ogt double undef, undef19; CHECK-NEXT:  Cost Model: Found costs of RThru:3 CodeSize:3 Lat:4 SizeLat:3 for: %cbf64 = fcmp ogt bfloat undef, undef20; CHECK-NEXT:  Cost Model: Found costs of RThru:7 CodeSize:5 Lat:5 SizeLat:5 for: %cfv816 = fcmp olt <8 x half> undef, undef21; CHECK-NEXT:  Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:1 for: %cfv432 = fcmp oge <4 x float> undef, undef22; CHECK-NEXT:  Cost Model: Found costs of RThru:1 CodeSize:1 Lat:2 SizeLat:1 for: %cfv264 = fcmp oge <2 x double> undef, undef23; CHECK-NEXT:  Cost Model: Found costs of RThru:7 CodeSize:5 Lat:5 SizeLat:5 for: %cbfv816 = fcmp olt <8 x bfloat> undef, undef24; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void25;26  %c8 = icmp slt i8 undef, undef27  %c16 = icmp ult i16 undef, undef28  %c32 = icmp sge i32 undef, undef29  %c64 = icmp ne i64 undef, undef30  %c128 = icmp ult i128 undef, undef31  %cv16i8 = icmp slt <16 x i8> undef, undef32  %cv8i16 = icmp ult <8 x i16> undef, undef33  %cv4i32 = icmp sge <4 x i32> undef, undef34  %cf16 = fcmp oge half undef, undef35  %cf32 = fcmp ogt float undef, undef36  %cf64 = fcmp ogt double undef, undef37  %cbf64 = fcmp ogt bfloat undef, undef38  %cfv816 = fcmp olt <8 x half> undef, undef39  %cfv432 = fcmp oge <4 x float> undef, undef40  %cfv264 = fcmp oge <2 x double> undef, undef41  %cbfv816 = fcmp olt <8 x bfloat> undef, undef42  ret void43}44 45 46define void @andcmp() {47; CHECK-LABEL: 'andcmp'48; CHECK-NEXT:  Cost Model: Found costs of 1 for: %a8 = and i8 undef, undef49; CHECK-NEXT:  Cost Model: Found costs of 1 for: %c8 = icmp eq i8 %a8, 050; CHECK-NEXT:  Cost Model: Found costs of 1 for: %a16 = and i16 undef, undef51; CHECK-NEXT:  Cost Model: Found costs of 1 for: %c16 = icmp ne i16 %a16, 052; CHECK-NEXT:  Cost Model: Found costs of 1 for: %a32 = and i32 undef, undef53; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: %c32 = icmp eq i32 %a32, 054; CHECK-NEXT:  Cost Model: Found costs of 1 for: %a64 = and i64 undef, undef55; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: %c64 = icmp ne i64 %a64, 056; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: %c32ge = icmp sge i32 %a32, 157; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: %c32le = icmp slt i32 %a32, 158; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: %c32leneg = icmp sle i32 %a32, -159; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: %c32gtneg = icmp sgt i32 %a32, -160; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: %c64ge = icmp sge i64 %a64, 161; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: %c64le = icmp slt i64 %a64, 162; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: %c64leneg = icmp sle i64 %a64, -163; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: %c64gtneg = icmp sgt i64 %a64, -164; CHECK-NEXT:  Cost Model: Found costs of RThru:2 CodeSize:1 Lat:1 SizeLat:1 for: %a128 = and i128 undef, undef65; CHECK-NEXT:  Cost Model: Found costs of 2 for: %c128 = icmp eq i128 %a128, 066; CHECK-NEXT:  Cost Model: Found costs of 1 for: %av16i8 = and <16 x i8> undef, undef67; CHECK-NEXT:  Cost Model: Found costs of 1 for: %cv16i8 = icmp ne <16 x i8> %av16i8, zeroinitializer68; CHECK-NEXT:  Cost Model: Found costs of 1 for: %av8i16 = and <8 x i16> undef, undef69; CHECK-NEXT:  Cost Model: Found costs of 1 for: %cv8i16 = icmp eq <8 x i16> %av8i16, zeroinitializer70; CHECK-NEXT:  Cost Model: Found costs of 1 for: %av4i32 = and <4 x i32> undef, undef71; CHECK-NEXT:  Cost Model: Found costs of 1 for: %cv4i32 = icmp ne <4 x i32> %av4i32, zeroinitializer72; CHECK-NEXT:  Cost Model: Found costs of 1 for: %c32not0 = icmp eq i32 %a32, 173; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: %c64sle = icmp sle i64 %a64, 074; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void75;76  %a8 = and i8 undef, undef77  %c8 = icmp eq i8 %a8, 078  %a16 = and i16 undef, undef79  %c16 = icmp ne i16 %a16, 080  %a32 = and i32 undef, undef81  %c32 = icmp eq i32 %a32, 082  %a64 = and i64 undef, undef83  %c64 = icmp ne i64 %a64, 084 85  %c32ge = icmp sge i32 %a32, 186  %c32le = icmp slt i32 %a32, 187  %c32leneg = icmp sle i32 %a32, -188  %c32gtneg  = icmp sgt i32 %a32, -189 90  %c64ge = icmp sge i64 %a64, 191  %c64le = icmp slt i64 %a64, 192  %c64leneg = icmp sle i64 %a64, -193  %c64gtneg  = icmp sgt i64 %a64, -194 95  %a128 = and i128 undef, undef96  %c128 = icmp eq i128 %a128, zeroinitializer97  %av16i8 = and <16 x i8> undef, undef98  %cv16i8 = icmp ne <16 x i8> %av16i8, zeroinitializer99  %av8i16 = and <8 x i16> undef, undef100  %cv8i16 = icmp eq <8 x i16> %av8i16, zeroinitializer101  %av4i32 = and <4 x i32> undef, undef102  %cv4i32 = icmp ne <4 x i32> %av4i32, zeroinitializer103 104  %c32not0 = icmp eq i32 %a32, 1105  %c64sle = icmp sle i64 %a64, 0106  ret void107}108 109define void @uscmp() {110; CHECK-LABEL: 'uscmp'111; CHECK-NEXT:  Cost Model: Found costs of 4 for: %u8 = call i8 @llvm.ucmp.i8.i8(i8 undef, i8 undef)112; CHECK-NEXT:  Cost Model: Found costs of 4 for: %u16 = call i16 @llvm.ucmp.i16.i16(i16 undef, i16 undef)113; CHECK-NEXT:  Cost Model: Found costs of 4 for: %u32 = call i32 @llvm.ucmp.i32.i32(i32 undef, i32 undef)114; CHECK-NEXT:  Cost Model: Found costs of 4 for: %u64 = call i64 @llvm.ucmp.i64.i64(i64 undef, i64 undef)115; CHECK-NEXT:  Cost Model: Found costs of 5 for: %uv16i8 = call <16 x i8> @llvm.ucmp.v16i8.v16i8(<16 x i8> undef, <16 x i8> undef)116; CHECK-NEXT:  Cost Model: Found costs of 5 for: %uv8i16 = call <8 x i16> @llvm.ucmp.v8i16.v8i16(<8 x i16> undef, <8 x i16> undef)117; CHECK-NEXT:  Cost Model: Found costs of 5 for: %uv4i32 = call <4 x i32> @llvm.ucmp.v4i32.v4i32(<4 x i32> undef, <4 x i32> undef)118; CHECK-NEXT:  Cost Model: Found costs of 4 for: %s8 = call i8 @llvm.scmp.i8.i8(i8 undef, i8 undef)119; CHECK-NEXT:  Cost Model: Found costs of 4 for: %s16 = call i16 @llvm.scmp.i16.i16(i16 undef, i16 undef)120; CHECK-NEXT:  Cost Model: Found costs of 4 for: %s32 = call i32 @llvm.scmp.i32.i32(i32 undef, i32 undef)121; CHECK-NEXT:  Cost Model: Found costs of 4 for: %s64 = call i64 @llvm.scmp.i64.i64(i64 undef, i64 undef)122; CHECK-NEXT:  Cost Model: Found costs of 5 for: %sv16i8 = call <16 x i8> @llvm.scmp.v16i8.v16i8(<16 x i8> undef, <16 x i8> undef)123; CHECK-NEXT:  Cost Model: Found costs of 5 for: %sv8i16 = call <8 x i16> @llvm.scmp.v8i16.v8i16(<8 x i16> undef, <8 x i16> undef)124; CHECK-NEXT:  Cost Model: Found costs of 5 for: %sv4i32 = call <4 x i32> @llvm.scmp.v4i32.v4i32(<4 x i32> undef, <4 x i32> undef)125; CHECK-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void126;127  %u8 = call i8 @llvm.ucmp(i8 undef, i8 undef)128  %u16 = call i16 @llvm.ucmp(i16 undef, i16 undef)129  %u32 = call i32 @llvm.ucmp(i32 undef, i32 undef)130  %u64 = call i64 @llvm.ucmp(i64 undef, i64 undef)131  %uv16i8 = call <16 x i8> @llvm.ucmp(<16 x i8> undef, <16 x i8> undef)132  %uv8i16 = call <8 x i16> @llvm.ucmp(<8 x i16> undef, <8 x i16> undef)133  %uv4i32 = call <4 x i32> @llvm.ucmp(<4 x i32> undef, <4 x i32> undef)134  %s8 = call i8 @llvm.scmp(i8 undef, i8 undef)135  %s16 = call i16 @llvm.scmp(i16 undef, i16 undef)136  %s32 = call i32 @llvm.scmp(i32 undef, i32 undef)137  %s64 = call i64 @llvm.scmp(i64 undef, i64 undef)138  %sv16i8 = call <16 x i8> @llvm.scmp(<16 x i8> undef, <16 x i8> undef)139  %sv8i16 = call <8 x i16> @llvm.scmp(<8 x i16> undef, <8 x i16> undef)140  %sv4i32 = call <4 x i32> @llvm.scmp(<4 x i32> undef, <4 x i32> undef)141  ret void142}143