1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py 2; RUN: opt -cost-model -analyze -mtriple=aarch64-- < %s | FileCheck %s --check-prefix=CHECK-THROUGHPUT 3; RUN: opt -cost-model -analyze -cost-kind=code-size -mtriple=aarch64-- < %s | FileCheck %s --check-prefix=CHECK-SIZE 4 5define i32 @cmps() { 6; CHECK-THROUGHPUT-LABEL: 'cmps' 7; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a0 = icmp slt i8 undef, undef 8; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a1 = icmp ult i16 undef, undef 9; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a2 = icmp sge i32 undef, undef 10; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a3 = icmp ne i64 undef, undef 11; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a4 = icmp slt <16 x i8> undef, undef 12; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a5 = icmp ult <8 x i16> undef, undef 13; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a6 = icmp sge <4 x i32> undef, undef 14; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a7 = fcmp oge half undef, undef 15; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a8 = fcmp ogt float undef, undef 16; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a9 = fcmp ogt double undef, undef 17; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 29 for instruction: %a10 = fcmp olt <8 x half> undef, undef 18; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a11 = fcmp oge <4 x float> undef, undef 19; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a12 = fcmp oge <2 x double> undef, undef 20; CHECK-THROUGHPUT-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret i32 undef 21; 22; CHECK-SIZE-LABEL: 'cmps' 23; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a0 = icmp slt i8 undef, undef 24; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a1 = icmp ult i16 undef, undef 25; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a2 = icmp sge i32 undef, undef 26; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a3 = icmp ne i64 undef, undef 27; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a4 = icmp slt <16 x i8> undef, undef 28; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a5 = icmp ult <8 x i16> undef, undef 29; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a6 = icmp sge <4 x i32> undef, undef 30; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a7 = fcmp oge half undef, undef 31; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a8 = fcmp ogt float undef, undef 32; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a9 = fcmp ogt double undef, undef 33; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a10 = fcmp olt <8 x half> undef, undef 34; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a11 = fcmp oge <4 x float> undef, undef 35; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %a12 = fcmp oge <2 x double> undef, undef 36; CHECK-SIZE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: ret i32 undef 37; 38 %a0 = icmp slt i8 undef, undef 39 %a1 = icmp ult i16 undef, undef 40 %a2 = icmp sge i32 undef, undef 41 %a3 = icmp ne i64 undef, undef 42 %a4 = icmp slt <16 x i8> undef, undef 43 %a5 = icmp ult <8 x i16> undef, undef 44 %a6 = icmp sge <4 x i32> undef, undef 45 %a7 = fcmp oge half undef, undef 46 %a8 = fcmp ogt float undef, undef 47 %a9 = fcmp ogt double undef, undef 48 %a10 = fcmp olt <8 x half> undef, undef 49 %a11 = fcmp oge <4 x float> undef, undef 50 %a12 = fcmp oge <2 x double> undef, undef 51 ret i32 undef 52} 53