brintos

brintos / llvm-project-archived public Read only

0
0
Text · 24.9 KiB · 032a448 Raw
304 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 %s --check-prefixes=COMMON,BASE3; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=aarch64--linux-gnu -mattr=+sve < %s | FileCheck %s --check-prefixes=COMMON,SVE4 5target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"6 7declare i64        @llvm.uadd.sat.i64(i64, i64)8declare <2 x i64>  @llvm.uadd.sat.v2i64(<2 x i64>, <2 x i64>)9declare <4 x i64>  @llvm.uadd.sat.v4i64(<4 x i64>, <4 x i64>)10declare <8 x i64>  @llvm.uadd.sat.v8i64(<8 x i64>, <8 x i64>)11 12declare i32        @llvm.uadd.sat.i32(i32, i32)13declare <2 x i32>  @llvm.uadd.sat.v2i32(<2 x i32>, <2 x i32>)14declare <4 x i32>  @llvm.uadd.sat.v4i32(<4 x i32>, <4 x i32>)15declare <8 x i32>  @llvm.uadd.sat.v8i32(<8 x i32>, <8 x i32>)16declare <16 x i32> @llvm.uadd.sat.v16i32(<16 x i32>, <16 x i32>)17 18declare i16        @llvm.uadd.sat.i16(i16, i16)19declare <2 x i16>  @llvm.uadd.sat.v2i16(<2 x i16>, <2 x i16>)20declare <4 x i16>  @llvm.uadd.sat.v4i16(<4 x i16>, <4 x i16>)21declare <8 x i16>  @llvm.uadd.sat.v8i16(<8 x i16>, <8 x i16>)22declare <16 x i16> @llvm.uadd.sat.v16i16(<16 x i16>, <16 x i16>)23declare <32 x i16> @llvm.uadd.sat.v32i16(<32 x i16>, <32 x i16>)24 25declare i8         @llvm.uadd.sat.i8(i8,  i8)26declare <2 x i8>   @llvm.uadd.sat.v2i8(<2 x i8>, <2 x i8>)27declare <4 x i8>   @llvm.uadd.sat.v4i8(<4 x i8>, <4 x i8>)28declare <8 x i8>   @llvm.uadd.sat.v8i8(<8 x i8>, <8 x i8>)29declare <16 x i8>  @llvm.uadd.sat.v16i8(<16 x i8>, <16 x i8>)30declare <32 x i8>  @llvm.uadd.sat.v32i8(<32 x i8>, <32 x i8>)31declare <64 x i8>  @llvm.uadd.sat.v64i8(<64 x i8>, <64 x i8>)32 33define i32 @add(i32 %arg) {34; COMMON-LABEL: 'add'35; COMMON-NEXT:  Cost Model: Found costs of 2 for: %I64 = call i64 @llvm.uadd.sat.i64(i64 poison, i64 poison)36; COMMON-NEXT:  Cost Model: Found costs of 1 for: %V2I64 = call <2 x i64> @llvm.uadd.sat.v2i64(<2 x i64> poison, <2 x i64> poison)37; COMMON-NEXT:  Cost Model: Found costs of 2 for: %V4I64 = call <4 x i64> @llvm.uadd.sat.v4i64(<4 x i64> poison, <4 x i64> poison)38; COMMON-NEXT:  Cost Model: Found costs of 4 for: %V8I64 = call <8 x i64> @llvm.uadd.sat.v8i64(<8 x i64> poison, <8 x i64> poison)39; COMMON-NEXT:  Cost Model: Found costs of 2 for: %I32 = call i32 @llvm.uadd.sat.i32(i32 poison, i32 poison)40; COMMON-NEXT:  Cost Model: Found costs of 1 for: %V2I32 = call <2 x i32> @llvm.uadd.sat.v2i32(<2 x i32> poison, <2 x i32> poison)41; COMMON-NEXT:  Cost Model: Found costs of 1 for: %V4I32 = call <4 x i32> @llvm.uadd.sat.v4i32(<4 x i32> poison, <4 x i32> poison)42; COMMON-NEXT:  Cost Model: Found costs of 2 for: %V8I32 = call <8 x i32> @llvm.uadd.sat.v8i32(<8 x i32> poison, <8 x i32> poison)43; COMMON-NEXT:  Cost Model: Found costs of 4 for: %V16I32 = call <16 x i32> @llvm.uadd.sat.v16i32(<16 x i32> poison, <16 x i32> poison)44; COMMON-NEXT:  Cost Model: Found costs of 4 for: %I16 = call i16 @llvm.uadd.sat.i16(i16 poison, i16 poison)45; COMMON-NEXT:  Cost Model: Found costs of 4 for: %V2I16 = call <2 x i16> @llvm.uadd.sat.v2i16(<2 x i16> poison, <2 x i16> poison)46; COMMON-NEXT:  Cost Model: Found costs of 1 for: %V4I16 = call <4 x i16> @llvm.uadd.sat.v4i16(<4 x i16> poison, <4 x i16> poison)47; COMMON-NEXT:  Cost Model: Found costs of 1 for: %V8I16 = call <8 x i16> @llvm.uadd.sat.v8i16(<8 x i16> poison, <8 x i16> poison)48; COMMON-NEXT:  Cost Model: Found costs of 2 for: %V16I16 = call <16 x i16> @llvm.uadd.sat.v16i16(<16 x i16> poison, <16 x i16> poison)49; COMMON-NEXT:  Cost Model: Found costs of 4 for: %V32I16 = call <32 x i16> @llvm.uadd.sat.v32i16(<32 x i16> poison, <32 x i16> poison)50; COMMON-NEXT:  Cost Model: Found costs of 4 for: %I8 = call i8 @llvm.uadd.sat.i8(i8 poison, i8 poison)51; COMMON-NEXT:  Cost Model: Found costs of 4 for: %V2I8 = call <2 x i8> @llvm.uadd.sat.v2i8(<2 x i8> poison, <2 x i8> poison)52; COMMON-NEXT:  Cost Model: Found costs of 4 for: %V4I8 = call <4 x i8> @llvm.uadd.sat.v4i8(<4 x i8> poison, <4 x i8> poison)53; COMMON-NEXT:  Cost Model: Found costs of 1 for: %V8I8 = call <8 x i8> @llvm.uadd.sat.v8i8(<8 x i8> poison, <8 x i8> poison)54; COMMON-NEXT:  Cost Model: Found costs of 1 for: %V16I8 = call <16 x i8> @llvm.uadd.sat.v16i8(<16 x i8> poison, <16 x i8> poison)55; COMMON-NEXT:  Cost Model: Found costs of 2 for: %V32I8 = call <32 x i8> @llvm.uadd.sat.v32i8(<32 x i8> poison, <32 x i8> poison)56; COMMON-NEXT:  Cost Model: Found costs of 4 for: %V64I8 = call <64 x i8> @llvm.uadd.sat.v64i8(<64 x i8> poison, <64 x i8> poison)57; COMMON-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 poison58;59  %I64 = call i64 @llvm.uadd.sat.i64(i64 poison, i64 poison)60  %V2I64 = call <2 x i64> @llvm.uadd.sat.v2i64(<2 x i64> poison, <2 x i64> poison)61  %V4I64 = call <4 x i64> @llvm.uadd.sat.v4i64(<4 x i64> poison, <4 x i64> poison)62  %V8I64 = call <8 x i64> @llvm.uadd.sat.v8i64(<8 x i64> poison, <8 x i64> poison)63 64  %I32 = call i32 @llvm.uadd.sat.i32(i32 poison, i32 poison)65  %V2I32  = call <2 x i32>  @llvm.uadd.sat.v2i32(<2 x i32> poison, <2 x i32> poison)66  %V4I32  = call <4 x i32>  @llvm.uadd.sat.v4i32(<4 x i32> poison, <4 x i32> poison)67  %V8I32  = call <8 x i32>  @llvm.uadd.sat.v8i32(<8 x i32> poison, <8 x i32> poison)68  %V16I32 = call <16 x i32> @llvm.uadd.sat.v16i32(<16 x i32> poison, <16 x i32> poison)69 70  %I16 = call i16 @llvm.uadd.sat.i16(i16 poison, i16 poison)71  %V2I16  = call <2 x i16>  @llvm.uadd.sat.v2i16(<2 x i16> poison, <2 x i16> poison)72  %V4I16  = call <4 x i16>  @llvm.uadd.sat.v4i16(<4 x i16> poison, <4 x i16> poison)73  %V8I16  = call <8 x i16>  @llvm.uadd.sat.v8i16(<8 x i16> poison, <8 x i16> poison)74  %V16I16 = call <16 x i16> @llvm.uadd.sat.v16i16(<16 x i16> poison, <16 x i16> poison)75  %V32I16 = call <32 x i16> @llvm.uadd.sat.v32i16(<32 x i16> poison, <32 x i16> poison)76 77  %I8 = call i8 @llvm.uadd.sat.i8(i8 poison, i8 poison)78  %V2I8  = call <2 x i8>  @llvm.uadd.sat.v2i8(<2 x i8> poison, <2 x i8> poison)79  %V4I8  = call <4 x i8>  @llvm.uadd.sat.v4i8(<4 x i8> poison, <4 x i8> poison)80  %V8I8  = call <8 x i8>  @llvm.uadd.sat.v8i8(<8 x i8> poison, <8 x i8> poison)81  %V16I8 = call <16 x i8> @llvm.uadd.sat.v16i8(<16 x i8> poison, <16 x i8> poison)82  %V32I8 = call <32 x i8> @llvm.uadd.sat.v32i8(<32 x i8> poison, <32 x i8> poison)83  %V64I8 = call <64 x i8> @llvm.uadd.sat.v64i8(<64 x i8> poison, <64 x i8> poison)84 85  ret i32 poison86}87 88define i32 @add_sve_vscale2(i32 %arg) vscale_range(2,2) {89; BASE-LABEL: 'add_sve_vscale2'90; BASE-NEXT:  Cost Model: Found costs of 1 for: %V2I64 = call <2 x i64> @llvm.uadd.sat.v2i64(<2 x i64> poison, <2 x i64> poison)91; BASE-NEXT:  Cost Model: Found costs of 2 for: %V4I64 = call <4 x i64> @llvm.uadd.sat.v4i64(<4 x i64> poison, <4 x i64> poison)92; BASE-NEXT:  Cost Model: Found costs of 4 for: %V8I64 = call <8 x i64> @llvm.uadd.sat.v8i64(<8 x i64> poison, <8 x i64> poison)93; BASE-NEXT:  Cost Model: Found costs of 1 for: %V2I32 = call <2 x i32> @llvm.uadd.sat.v2i32(<2 x i32> poison, <2 x i32> poison)94; BASE-NEXT:  Cost Model: Found costs of 1 for: %V4I32 = call <4 x i32> @llvm.uadd.sat.v4i32(<4 x i32> poison, <4 x i32> poison)95; BASE-NEXT:  Cost Model: Found costs of 2 for: %V8I32 = call <8 x i32> @llvm.uadd.sat.v8i32(<8 x i32> poison, <8 x i32> poison)96; BASE-NEXT:  Cost Model: Found costs of 4 for: %V16I32 = call <16 x i32> @llvm.uadd.sat.v16i32(<16 x i32> poison, <16 x i32> poison)97; BASE-NEXT:  Cost Model: Found costs of 4 for: %V2I16 = call <2 x i16> @llvm.uadd.sat.v2i16(<2 x i16> poison, <2 x i16> poison)98; BASE-NEXT:  Cost Model: Found costs of 1 for: %V4I16 = call <4 x i16> @llvm.uadd.sat.v4i16(<4 x i16> poison, <4 x i16> poison)99; BASE-NEXT:  Cost Model: Found costs of 1 for: %V8I16 = call <8 x i16> @llvm.uadd.sat.v8i16(<8 x i16> poison, <8 x i16> poison)100; BASE-NEXT:  Cost Model: Found costs of 2 for: %V16I16 = call <16 x i16> @llvm.uadd.sat.v16i16(<16 x i16> poison, <16 x i16> poison)101; BASE-NEXT:  Cost Model: Found costs of 4 for: %V32I16 = call <32 x i16> @llvm.uadd.sat.v32i16(<32 x i16> poison, <32 x i16> poison)102; BASE-NEXT:  Cost Model: Found costs of 4 for: %V2I8 = call <2 x i8> @llvm.uadd.sat.v2i8(<2 x i8> poison, <2 x i8> poison)103; BASE-NEXT:  Cost Model: Found costs of 4 for: %V4I8 = call <4 x i8> @llvm.uadd.sat.v4i8(<4 x i8> poison, <4 x i8> poison)104; BASE-NEXT:  Cost Model: Found costs of 1 for: %V8I8 = call <8 x i8> @llvm.uadd.sat.v8i8(<8 x i8> poison, <8 x i8> poison)105; BASE-NEXT:  Cost Model: Found costs of 1 for: %V16I8 = call <16 x i8> @llvm.uadd.sat.v16i8(<16 x i8> poison, <16 x i8> poison)106; BASE-NEXT:  Cost Model: Found costs of 2 for: %V32I8 = call <32 x i8> @llvm.uadd.sat.v32i8(<32 x i8> poison, <32 x i8> poison)107; BASE-NEXT:  Cost Model: Found costs of 4 for: %V64I8 = call <64 x i8> @llvm.uadd.sat.v64i8(<64 x i8> poison, <64 x i8> poison)108; BASE-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 poison109;110; SVE-LABEL: 'add_sve_vscale2'111; SVE-NEXT:  Cost Model: Found costs of 1 for: %V2I64 = call <2 x i64> @llvm.uadd.sat.v2i64(<2 x i64> poison, <2 x i64> poison)112; SVE-NEXT:  Cost Model: Found costs of 1 for: %V4I64 = call <4 x i64> @llvm.uadd.sat.v4i64(<4 x i64> poison, <4 x i64> poison)113; SVE-NEXT:  Cost Model: Found costs of 2 for: %V8I64 = call <8 x i64> @llvm.uadd.sat.v8i64(<8 x i64> poison, <8 x i64> poison)114; SVE-NEXT:  Cost Model: Found costs of 1 for: %V2I32 = call <2 x i32> @llvm.uadd.sat.v2i32(<2 x i32> poison, <2 x i32> poison)115; SVE-NEXT:  Cost Model: Found costs of 1 for: %V4I32 = call <4 x i32> @llvm.uadd.sat.v4i32(<4 x i32> poison, <4 x i32> poison)116; SVE-NEXT:  Cost Model: Found costs of 1 for: %V8I32 = call <8 x i32> @llvm.uadd.sat.v8i32(<8 x i32> poison, <8 x i32> poison)117; SVE-NEXT:  Cost Model: Found costs of 2 for: %V16I32 = call <16 x i32> @llvm.uadd.sat.v16i32(<16 x i32> poison, <16 x i32> poison)118; SVE-NEXT:  Cost Model: Found costs of 4 for: %V2I16 = call <2 x i16> @llvm.uadd.sat.v2i16(<2 x i16> poison, <2 x i16> poison)119; SVE-NEXT:  Cost Model: Found costs of 1 for: %V4I16 = call <4 x i16> @llvm.uadd.sat.v4i16(<4 x i16> poison, <4 x i16> poison)120; SVE-NEXT:  Cost Model: Found costs of 1 for: %V8I16 = call <8 x i16> @llvm.uadd.sat.v8i16(<8 x i16> poison, <8 x i16> poison)121; SVE-NEXT:  Cost Model: Found costs of 1 for: %V16I16 = call <16 x i16> @llvm.uadd.sat.v16i16(<16 x i16> poison, <16 x i16> poison)122; SVE-NEXT:  Cost Model: Found costs of 2 for: %V32I16 = call <32 x i16> @llvm.uadd.sat.v32i16(<32 x i16> poison, <32 x i16> poison)123; SVE-NEXT:  Cost Model: Found costs of 4 for: %V2I8 = call <2 x i8> @llvm.uadd.sat.v2i8(<2 x i8> poison, <2 x i8> poison)124; SVE-NEXT:  Cost Model: Found costs of 4 for: %V4I8 = call <4 x i8> @llvm.uadd.sat.v4i8(<4 x i8> poison, <4 x i8> poison)125; SVE-NEXT:  Cost Model: Found costs of 1 for: %V8I8 = call <8 x i8> @llvm.uadd.sat.v8i8(<8 x i8> poison, <8 x i8> poison)126; SVE-NEXT:  Cost Model: Found costs of 1 for: %V16I8 = call <16 x i8> @llvm.uadd.sat.v16i8(<16 x i8> poison, <16 x i8> poison)127; SVE-NEXT:  Cost Model: Found costs of 1 for: %V32I8 = call <32 x i8> @llvm.uadd.sat.v32i8(<32 x i8> poison, <32 x i8> poison)128; SVE-NEXT:  Cost Model: Found costs of 2 for: %V64I8 = call <64 x i8> @llvm.uadd.sat.v64i8(<64 x i8> poison, <64 x i8> poison)129; SVE-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 poison130;131  %V2I64 = call <2 x i64> @llvm.uadd.sat.v2i64(<2 x i64> poison, <2 x i64> poison)132  %V4I64 = call <4 x i64> @llvm.uadd.sat.v4i64(<4 x i64> poison, <4 x i64> poison)133  %V8I64 = call <8 x i64> @llvm.uadd.sat.v8i64(<8 x i64> poison, <8 x i64> poison)134 135  %V2I32  = call <2 x i32>  @llvm.uadd.sat.v2i32(<2 x i32> poison, <2 x i32> poison)136  %V4I32  = call <4 x i32>  @llvm.uadd.sat.v4i32(<4 x i32> poison, <4 x i32> poison)137  %V8I32  = call <8 x i32>  @llvm.uadd.sat.v8i32(<8 x i32> poison, <8 x i32> poison)138  %V16I32 = call <16 x i32> @llvm.uadd.sat.v16i32(<16 x i32> poison, <16 x i32> poison)139 140  %V2I16  = call <2 x i16>  @llvm.uadd.sat.v2i16(<2 x i16> poison, <2 x i16> poison)141  %V4I16  = call <4 x i16>  @llvm.uadd.sat.v4i16(<4 x i16> poison, <4 x i16> poison)142  %V8I16  = call <8 x i16>  @llvm.uadd.sat.v8i16(<8 x i16> poison, <8 x i16> poison)143  %V16I16 = call <16 x i16> @llvm.uadd.sat.v16i16(<16 x i16> poison, <16 x i16> poison)144  %V32I16 = call <32 x i16> @llvm.uadd.sat.v32i16(<32 x i16> poison, <32 x i16> poison)145 146  %V2I8  = call <2 x i8>  @llvm.uadd.sat.v2i8(<2 x i8> poison, <2 x i8> poison)147  %V4I8  = call <4 x i8>  @llvm.uadd.sat.v4i8(<4 x i8> poison, <4 x i8> poison)148  %V8I8  = call <8 x i8>  @llvm.uadd.sat.v8i8(<8 x i8> poison, <8 x i8> poison)149  %V16I8 = call <16 x i8> @llvm.uadd.sat.v16i8(<16 x i8> poison, <16 x i8> poison)150  %V32I8 = call <32 x i8> @llvm.uadd.sat.v32i8(<32 x i8> poison, <32 x i8> poison)151  %V64I8 = call <64 x i8> @llvm.uadd.sat.v64i8(<64 x i8> poison, <64 x i8> poison)152 153  ret i32 poison154}155 156declare i64        @llvm.usub.sat.i64(i64, i64)157declare <2 x i64>  @llvm.usub.sat.v2i64(<2 x i64>, <2 x i64>)158declare <4 x i64>  @llvm.usub.sat.v4i64(<4 x i64>, <4 x i64>)159declare <8 x i64>  @llvm.usub.sat.v8i64(<8 x i64>, <8 x i64>)160 161declare i32        @llvm.usub.sat.i32(i32, i32)162declare <2 x i32>  @llvm.usub.sat.v2i32(<2 x i32>, <2 x i32>)163declare <4 x i32>  @llvm.usub.sat.v4i32(<4 x i32>, <4 x i32>)164declare <8 x i32>  @llvm.usub.sat.v8i32(<8 x i32>, <8 x i32>)165declare <16 x i32> @llvm.usub.sat.v16i32(<16 x i32>, <16 x i32>)166 167declare i16        @llvm.usub.sat.i16(i16, i16)168declare <2 x i16>  @llvm.usub.sat.v2i16(<2 x i16>, <2 x i16>)169declare <4 x i16>  @llvm.usub.sat.v4i16(<4 x i16>, <4 x i16>)170declare <8 x i16>  @llvm.usub.sat.v8i16(<8 x i16>, <8 x i16>)171declare <16 x i16> @llvm.usub.sat.v16i16(<16 x i16>, <16 x i16>)172declare <32 x i16> @llvm.usub.sat.v32i16(<32 x i16>, <32 x i16>)173 174declare i8         @llvm.usub.sat.i8(i8,  i8)175declare <2 x i8>   @llvm.usub.sat.v2i8(<2 x i8>, <2 x i8>)176declare <4 x i8>   @llvm.usub.sat.v4i8(<4 x i8>, <4 x i8>)177declare <8 x i8>   @llvm.usub.sat.v8i8(<8 x i8>, <8 x i8>)178declare <16 x i8>  @llvm.usub.sat.v16i8(<16 x i8>, <16 x i8>)179declare <32 x i8>  @llvm.usub.sat.v32i8(<32 x i8>, <32 x i8>)180declare <64 x i8>  @llvm.usub.sat.v64i8(<64 x i8>, <64 x i8>)181 182define i32 @sub(i32 %arg) {183; COMMON-LABEL: 'sub'184; COMMON-NEXT:  Cost Model: Found costs of 2 for: %I64 = call i64 @llvm.usub.sat.i64(i64 poison, i64 poison)185; COMMON-NEXT:  Cost Model: Found costs of 1 for: %V2I64 = call <2 x i64> @llvm.usub.sat.v2i64(<2 x i64> poison, <2 x i64> poison)186; COMMON-NEXT:  Cost Model: Found costs of 2 for: %V4I64 = call <4 x i64> @llvm.usub.sat.v4i64(<4 x i64> poison, <4 x i64> poison)187; COMMON-NEXT:  Cost Model: Found costs of 4 for: %V8I64 = call <8 x i64> @llvm.usub.sat.v8i64(<8 x i64> poison, <8 x i64> poison)188; COMMON-NEXT:  Cost Model: Found costs of 2 for: %I32 = call i32 @llvm.usub.sat.i32(i32 poison, i32 poison)189; COMMON-NEXT:  Cost Model: Found costs of 1 for: %V2I32 = call <2 x i32> @llvm.usub.sat.v2i32(<2 x i32> poison, <2 x i32> poison)190; COMMON-NEXT:  Cost Model: Found costs of 1 for: %V4I32 = call <4 x i32> @llvm.usub.sat.v4i32(<4 x i32> poison, <4 x i32> poison)191; COMMON-NEXT:  Cost Model: Found costs of 2 for: %V8I32 = call <8 x i32> @llvm.usub.sat.v8i32(<8 x i32> poison, <8 x i32> poison)192; COMMON-NEXT:  Cost Model: Found costs of 4 for: %V16I32 = call <16 x i32> @llvm.usub.sat.v16i32(<16 x i32> poison, <16 x i32> poison)193; COMMON-NEXT:  Cost Model: Found costs of 4 for: %I16 = call i16 @llvm.usub.sat.i16(i16 poison, i16 poison)194; COMMON-NEXT:  Cost Model: Found costs of 4 for: %V2I16 = call <2 x i16> @llvm.usub.sat.v2i16(<2 x i16> poison, <2 x i16> poison)195; COMMON-NEXT:  Cost Model: Found costs of 1 for: %V4I16 = call <4 x i16> @llvm.usub.sat.v4i16(<4 x i16> poison, <4 x i16> poison)196; COMMON-NEXT:  Cost Model: Found costs of 1 for: %V8I16 = call <8 x i16> @llvm.usub.sat.v8i16(<8 x i16> poison, <8 x i16> poison)197; COMMON-NEXT:  Cost Model: Found costs of 2 for: %V16I16 = call <16 x i16> @llvm.usub.sat.v16i16(<16 x i16> poison, <16 x i16> poison)198; COMMON-NEXT:  Cost Model: Found costs of 4 for: %V32I16 = call <32 x i16> @llvm.usub.sat.v32i16(<32 x i16> poison, <32 x i16> poison)199; COMMON-NEXT:  Cost Model: Found costs of 4 for: %I8 = call i8 @llvm.usub.sat.i8(i8 poison, i8 poison)200; COMMON-NEXT:  Cost Model: Found costs of 4 for: %V2I8 = call <2 x i8> @llvm.usub.sat.v2i8(<2 x i8> poison, <2 x i8> poison)201; COMMON-NEXT:  Cost Model: Found costs of 4 for: %V4I8 = call <4 x i8> @llvm.usub.sat.v4i8(<4 x i8> poison, <4 x i8> poison)202; COMMON-NEXT:  Cost Model: Found costs of 1 for: %V8I8 = call <8 x i8> @llvm.usub.sat.v8i8(<8 x i8> poison, <8 x i8> poison)203; COMMON-NEXT:  Cost Model: Found costs of 1 for: %V16I8 = call <16 x i8> @llvm.usub.sat.v16i8(<16 x i8> poison, <16 x i8> poison)204; COMMON-NEXT:  Cost Model: Found costs of 2 for: %V32I8 = call <32 x i8> @llvm.usub.sat.v32i8(<32 x i8> poison, <32 x i8> poison)205; COMMON-NEXT:  Cost Model: Found costs of 4 for: %V64I8 = call <64 x i8> @llvm.usub.sat.v64i8(<64 x i8> poison, <64 x i8> poison)206; COMMON-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 poison207;208  %I64 = call i64 @llvm.usub.sat.i64(i64 poison, i64 poison)209  %V2I64 = call <2 x i64> @llvm.usub.sat.v2i64(<2 x i64> poison, <2 x i64> poison)210  %V4I64 = call <4 x i64> @llvm.usub.sat.v4i64(<4 x i64> poison, <4 x i64> poison)211  %V8I64 = call <8 x i64> @llvm.usub.sat.v8i64(<8 x i64> poison, <8 x i64> poison)212 213  %I32 = call i32 @llvm.usub.sat.i32(i32 poison, i32 poison)214  %V2I32  = call <2 x i32>  @llvm.usub.sat.v2i32(<2 x i32> poison, <2 x i32> poison)215  %V4I32  = call <4 x i32>  @llvm.usub.sat.v4i32(<4 x i32> poison, <4 x i32> poison)216  %V8I32  = call <8 x i32>  @llvm.usub.sat.v8i32(<8 x i32> poison, <8 x i32> poison)217  %V16I32 = call <16 x i32> @llvm.usub.sat.v16i32(<16 x i32> poison, <16 x i32> poison)218 219  %I16 = call i16 @llvm.usub.sat.i16(i16 poison, i16 poison)220  %V2I16  = call <2 x i16>  @llvm.usub.sat.v2i16(<2 x i16> poison, <2 x i16> poison)221  %V4I16  = call <4 x i16>  @llvm.usub.sat.v4i16(<4 x i16> poison, <4 x i16> poison)222  %V8I16  = call <8 x i16>  @llvm.usub.sat.v8i16(<8 x i16> poison, <8 x i16> poison)223  %V16I16 = call <16 x i16> @llvm.usub.sat.v16i16(<16 x i16> poison, <16 x i16> poison)224  %V32I16 = call <32 x i16> @llvm.usub.sat.v32i16(<32 x i16> poison, <32 x i16> poison)225 226  %I8 = call i8 @llvm.usub.sat.i8(i8 poison, i8 poison)227  %V2I8  = call <2 x i8>  @llvm.usub.sat.v2i8(<2 x i8> poison, <2 x i8> poison)228  %V4I8  = call <4 x i8>  @llvm.usub.sat.v4i8(<4 x i8> poison, <4 x i8> poison)229  %V8I8  = call <8 x i8>  @llvm.usub.sat.v8i8(<8 x i8> poison, <8 x i8> poison)230  %V16I8 = call <16 x i8> @llvm.usub.sat.v16i8(<16 x i8> poison, <16 x i8> poison)231  %V32I8 = call <32 x i8> @llvm.usub.sat.v32i8(<32 x i8> poison, <32 x i8> poison)232  %V64I8 = call <64 x i8> @llvm.usub.sat.v64i8(<64 x i8> poison, <64 x i8> poison)233 234  ret i32 poison235}236 237define i32 @sub_sve_vscale2(i32 %arg) vscale_range(2,2) {238; BASE-LABEL: 'sub_sve_vscale2'239; BASE-NEXT:  Cost Model: Found costs of 1 for: %V2I64 = call <2 x i64> @llvm.usub.sat.v2i64(<2 x i64> poison, <2 x i64> poison)240; BASE-NEXT:  Cost Model: Found costs of 2 for: %V4I64 = call <4 x i64> @llvm.usub.sat.v4i64(<4 x i64> poison, <4 x i64> poison)241; BASE-NEXT:  Cost Model: Found costs of 4 for: %V8I64 = call <8 x i64> @llvm.usub.sat.v8i64(<8 x i64> poison, <8 x i64> poison)242; BASE-NEXT:  Cost Model: Found costs of 1 for: %V2I32 = call <2 x i32> @llvm.usub.sat.v2i32(<2 x i32> poison, <2 x i32> poison)243; BASE-NEXT:  Cost Model: Found costs of 1 for: %V4I32 = call <4 x i32> @llvm.usub.sat.v4i32(<4 x i32> poison, <4 x i32> poison)244; BASE-NEXT:  Cost Model: Found costs of 2 for: %V8I32 = call <8 x i32> @llvm.usub.sat.v8i32(<8 x i32> poison, <8 x i32> poison)245; BASE-NEXT:  Cost Model: Found costs of 4 for: %V16I32 = call <16 x i32> @llvm.usub.sat.v16i32(<16 x i32> poison, <16 x i32> poison)246; BASE-NEXT:  Cost Model: Found costs of 4 for: %V2I16 = call <2 x i16> @llvm.usub.sat.v2i16(<2 x i16> poison, <2 x i16> poison)247; BASE-NEXT:  Cost Model: Found costs of 1 for: %V4I16 = call <4 x i16> @llvm.usub.sat.v4i16(<4 x i16> poison, <4 x i16> poison)248; BASE-NEXT:  Cost Model: Found costs of 1 for: %V8I16 = call <8 x i16> @llvm.usub.sat.v8i16(<8 x i16> poison, <8 x i16> poison)249; BASE-NEXT:  Cost Model: Found costs of 2 for: %V16I16 = call <16 x i16> @llvm.usub.sat.v16i16(<16 x i16> poison, <16 x i16> poison)250; BASE-NEXT:  Cost Model: Found costs of 4 for: %V32I16 = call <32 x i16> @llvm.usub.sat.v32i16(<32 x i16> poison, <32 x i16> poison)251; BASE-NEXT:  Cost Model: Found costs of 4 for: %V2I8 = call <2 x i8> @llvm.usub.sat.v2i8(<2 x i8> poison, <2 x i8> poison)252; BASE-NEXT:  Cost Model: Found costs of 4 for: %V4I8 = call <4 x i8> @llvm.usub.sat.v4i8(<4 x i8> poison, <4 x i8> poison)253; BASE-NEXT:  Cost Model: Found costs of 1 for: %V8I8 = call <8 x i8> @llvm.usub.sat.v8i8(<8 x i8> poison, <8 x i8> poison)254; BASE-NEXT:  Cost Model: Found costs of 1 for: %V16I8 = call <16 x i8> @llvm.usub.sat.v16i8(<16 x i8> poison, <16 x i8> poison)255; BASE-NEXT:  Cost Model: Found costs of 2 for: %V32I8 = call <32 x i8> @llvm.usub.sat.v32i8(<32 x i8> poison, <32 x i8> poison)256; BASE-NEXT:  Cost Model: Found costs of 4 for: %V64I8 = call <64 x i8> @llvm.usub.sat.v64i8(<64 x i8> poison, <64 x i8> poison)257; BASE-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 poison258;259; SVE-LABEL: 'sub_sve_vscale2'260; SVE-NEXT:  Cost Model: Found costs of 1 for: %V2I64 = call <2 x i64> @llvm.usub.sat.v2i64(<2 x i64> poison, <2 x i64> poison)261; SVE-NEXT:  Cost Model: Found costs of 1 for: %V4I64 = call <4 x i64> @llvm.usub.sat.v4i64(<4 x i64> poison, <4 x i64> poison)262; SVE-NEXT:  Cost Model: Found costs of 2 for: %V8I64 = call <8 x i64> @llvm.usub.sat.v8i64(<8 x i64> poison, <8 x i64> poison)263; SVE-NEXT:  Cost Model: Found costs of 1 for: %V2I32 = call <2 x i32> @llvm.usub.sat.v2i32(<2 x i32> poison, <2 x i32> poison)264; SVE-NEXT:  Cost Model: Found costs of 1 for: %V4I32 = call <4 x i32> @llvm.usub.sat.v4i32(<4 x i32> poison, <4 x i32> poison)265; SVE-NEXT:  Cost Model: Found costs of 1 for: %V8I32 = call <8 x i32> @llvm.usub.sat.v8i32(<8 x i32> poison, <8 x i32> poison)266; SVE-NEXT:  Cost Model: Found costs of 2 for: %V16I32 = call <16 x i32> @llvm.usub.sat.v16i32(<16 x i32> poison, <16 x i32> poison)267; SVE-NEXT:  Cost Model: Found costs of 4 for: %V2I16 = call <2 x i16> @llvm.usub.sat.v2i16(<2 x i16> poison, <2 x i16> poison)268; SVE-NEXT:  Cost Model: Found costs of 1 for: %V4I16 = call <4 x i16> @llvm.usub.sat.v4i16(<4 x i16> poison, <4 x i16> poison)269; SVE-NEXT:  Cost Model: Found costs of 1 for: %V8I16 = call <8 x i16> @llvm.usub.sat.v8i16(<8 x i16> poison, <8 x i16> poison)270; SVE-NEXT:  Cost Model: Found costs of 1 for: %V16I16 = call <16 x i16> @llvm.usub.sat.v16i16(<16 x i16> poison, <16 x i16> poison)271; SVE-NEXT:  Cost Model: Found costs of 2 for: %V32I16 = call <32 x i16> @llvm.usub.sat.v32i16(<32 x i16> poison, <32 x i16> poison)272; SVE-NEXT:  Cost Model: Found costs of 4 for: %V2I8 = call <2 x i8> @llvm.usub.sat.v2i8(<2 x i8> poison, <2 x i8> poison)273; SVE-NEXT:  Cost Model: Found costs of 4 for: %V4I8 = call <4 x i8> @llvm.usub.sat.v4i8(<4 x i8> poison, <4 x i8> poison)274; SVE-NEXT:  Cost Model: Found costs of 1 for: %V8I8 = call <8 x i8> @llvm.usub.sat.v8i8(<8 x i8> poison, <8 x i8> poison)275; SVE-NEXT:  Cost Model: Found costs of 1 for: %V16I8 = call <16 x i8> @llvm.usub.sat.v16i8(<16 x i8> poison, <16 x i8> poison)276; SVE-NEXT:  Cost Model: Found costs of 1 for: %V32I8 = call <32 x i8> @llvm.usub.sat.v32i8(<32 x i8> poison, <32 x i8> poison)277; SVE-NEXT:  Cost Model: Found costs of 2 for: %V64I8 = call <64 x i8> @llvm.usub.sat.v64i8(<64 x i8> poison, <64 x i8> poison)278; SVE-NEXT:  Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret i32 poison279;280  %V2I64 = call <2 x i64> @llvm.usub.sat.v2i64(<2 x i64> poison, <2 x i64> poison)281  %V4I64 = call <4 x i64> @llvm.usub.sat.v4i64(<4 x i64> poison, <4 x i64> poison)282  %V8I64 = call <8 x i64> @llvm.usub.sat.v8i64(<8 x i64> poison, <8 x i64> poison)283 284  %V2I32  = call <2 x i32>  @llvm.usub.sat.v2i32(<2 x i32> poison, <2 x i32> poison)285  %V4I32  = call <4 x i32>  @llvm.usub.sat.v4i32(<4 x i32> poison, <4 x i32> poison)286  %V8I32  = call <8 x i32>  @llvm.usub.sat.v8i32(<8 x i32> poison, <8 x i32> poison)287  %V16I32 = call <16 x i32> @llvm.usub.sat.v16i32(<16 x i32> poison, <16 x i32> poison)288 289  %V2I16  = call <2 x i16>  @llvm.usub.sat.v2i16(<2 x i16> poison, <2 x i16> poison)290  %V4I16  = call <4 x i16>  @llvm.usub.sat.v4i16(<4 x i16> poison, <4 x i16> poison)291  %V8I16  = call <8 x i16>  @llvm.usub.sat.v8i16(<8 x i16> poison, <8 x i16> poison)292  %V16I16 = call <16 x i16> @llvm.usub.sat.v16i16(<16 x i16> poison, <16 x i16> poison)293  %V32I16 = call <32 x i16> @llvm.usub.sat.v32i16(<32 x i16> poison, <32 x i16> poison)294 295  %V2I8  = call <2 x i8>  @llvm.usub.sat.v2i8(<2 x i8> poison, <2 x i8> poison)296  %V4I8  = call <4 x i8>  @llvm.usub.sat.v4i8(<4 x i8> poison, <4 x i8> poison)297  %V8I8  = call <8 x i8>  @llvm.usub.sat.v8i8(<8 x i8> poison, <8 x i8> poison)298  %V16I8 = call <16 x i8> @llvm.usub.sat.v16i8(<16 x i8> poison, <16 x i8> poison)299  %V32I8 = call <32 x i8> @llvm.usub.sat.v32i8(<32 x i8> poison, <32 x i8> poison)300  %V64I8 = call <64 x i8> @llvm.usub.sat.v64i8(<64 x i8> poison, <64 x i8> poison)301 302  ret i32 poison303}304