74 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py2; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=thumbv8m.base | FileCheck %s --check-prefix=CHECK-T13; RUN: opt < %s -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=thumbv8m.main | FileCheck %s --check-prefix=CHECK-T24 5target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"6 7define i32 @const_costs() {8; CHECK-T1-LABEL: 'const_costs'9; CHECK-T1-NEXT: Cost Model: Found costs of 1 for: %add_1 = add i32 undef, 110; CHECK-T1-NEXT: Cost Model: Found costs of 1 for: %add_32767 = add i32 undef, 3276711; CHECK-T1-NEXT: Cost Model: Found costs of 1 for: %sub_1 = sub i32 undef, 112; CHECK-T1-NEXT: Cost Model: Found costs of 1 for: %sub_32768 = sub i32 undef, 3276813; CHECK-T1-NEXT: Cost Model: Found costs of 1 for: %mul_2 = mul i32 undef, 214; CHECK-T1-NEXT: Cost Model: Found costs of 1 for: %mul_3 = mul i32 undef, 315; CHECK-T1-NEXT: Cost Model: Found costs of 1 for: %mul_27 = mul i32 undef, 2716; CHECK-T1-NEXT: Cost Model: Found costs of 1 for: %and_255 = and i32 undef, 25517; CHECK-T1-NEXT: Cost Model: Found costs of 1 for: %and_65535 = and i32 undef, 6553518; CHECK-T1-NEXT: Cost Model: Found costs of 1 for: %and_1 = and i32 undef, 119; CHECK-T1-NEXT: Cost Model: Found costs of 1 for: %xor_1 = xor i32 undef, 120; CHECK-T1-NEXT: Cost Model: Found costs of 1 for: %xor_7 = xor i32 undef, 721; CHECK-T1-NEXT: Cost Model: Found costs of 0 for: %gep_1 = getelementptr i32, ptr undef, i32 122; CHECK-T1-NEXT: Cost Model: Found costs of 0 for: %gep_16 = getelementptr i32, ptr undef, i32 1623; CHECK-T1-NEXT: Cost Model: Found costs of 1 for: %cmp_244 = icmp ne i32 undef, 24424; CHECK-T1-NEXT: Cost Model: Found costs of 1 for: %cmp_256 = icmp uge i32 undef, 25625; CHECK-T1-NEXT: Cost Model: Found costs of 1 for: %cmp_1024 = icmp ult i32 undef, 102426; CHECK-T1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:1 SizeLat:1 for: %select_1_0 = select i1 undef, i32 1, i32 027; CHECK-T1-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:1 SizeLat:1 for: %select_7_255 = select i1 undef, i32 7, i32 25528; CHECK-T1-NEXT: Cost Model: Found costs of 1 for: ret i32 129;30; CHECK-T2-LABEL: 'const_costs'31; CHECK-T2-NEXT: Cost Model: Found costs of 1 for: %add_1 = add i32 undef, 132; CHECK-T2-NEXT: Cost Model: Found costs of 1 for: %add_32767 = add i32 undef, 3276733; CHECK-T2-NEXT: Cost Model: Found costs of 1 for: %sub_1 = sub i32 undef, 134; CHECK-T2-NEXT: Cost Model: Found costs of 1 for: %sub_32768 = sub i32 undef, 3276835; CHECK-T2-NEXT: Cost Model: Found costs of 1 for: %mul_2 = mul i32 undef, 236; CHECK-T2-NEXT: Cost Model: Found costs of 1 for: %mul_3 = mul i32 undef, 337; CHECK-T2-NEXT: Cost Model: Found costs of 1 for: %mul_27 = mul i32 undef, 2738; CHECK-T2-NEXT: Cost Model: Found costs of 1 for: %and_255 = and i32 undef, 25539; CHECK-T2-NEXT: Cost Model: Found costs of 1 for: %and_65535 = and i32 undef, 6553540; CHECK-T2-NEXT: Cost Model: Found costs of 1 for: %and_1 = and i32 undef, 141; CHECK-T2-NEXT: Cost Model: Found costs of 1 for: %xor_1 = xor i32 undef, 142; CHECK-T2-NEXT: Cost Model: Found costs of 1 for: %xor_7 = xor i32 undef, 743; CHECK-T2-NEXT: Cost Model: Found costs of 0 for: %gep_1 = getelementptr i32, ptr undef, i32 144; CHECK-T2-NEXT: Cost Model: Found costs of 0 for: %gep_16 = getelementptr i32, ptr undef, i32 1645; CHECK-T2-NEXT: Cost Model: Found costs of 1 for: %cmp_244 = icmp ne i32 undef, 24446; CHECK-T2-NEXT: Cost Model: Found costs of 1 for: %cmp_256 = icmp uge i32 undef, 25647; CHECK-T2-NEXT: Cost Model: Found costs of 1 for: %cmp_1024 = icmp ult i32 undef, 102448; CHECK-T2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:1 SizeLat:1 for: %select_1_0 = select i1 undef, i32 1, i32 049; CHECK-T2-NEXT: Cost Model: Found costs of RThru:1 CodeSize:2 Lat:1 SizeLat:1 for: %select_7_255 = select i1 undef, i32 7, i32 25550; CHECK-T2-NEXT: Cost Model: Found costs of 1 for: ret i32 151;52 %add_1 = add i32 undef, 153 %add_32767 = add i32 undef, 3276754 %sub_1 = sub i32 undef, 155 %sub_32768 = sub i32 undef, 3276856 %mul_2 = mul i32 undef, 257 %mul_3 = mul i32 undef, 358 %mul_27 = mul i32 undef, 2759 %and_255 = and i32 undef, 25560 %and_65535 = and i32 undef, 6553561 %and_1 = and i32 undef, 162 %xor_1 = xor i32 undef, 163 %xor_7 = xor i32 undef, 764 %gep_1 = getelementptr i32, ptr undef, i32 165 %gep_16 = getelementptr i32, ptr undef, i32 1666 %cmp_244 = icmp ne i32 undef, 24467 %cmp_256 = icmp uge i32 undef, 25668 %cmp_1024 = icmp ult i32 undef, 102469 %select_1_0 = select i1 undef, i32 1, i32 070 %select_7_255 = select i1 undef, i32 7, i32 25571 ret i32 172}73 74