100 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py2; RUN: opt -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=thumbv8.1m.main-none-eabi -mattr=+mve < %s | FileCheck %s --check-prefixes=CHECK,CHECK-MVE3; RUN: opt -passes="print<cost-model>" -cost-kind=all 2>&1 -disable-output -mtriple=thumbv8.1m.main-none-eabi -mattr=+mve.fp < %s | FileCheck %s --check-prefixes=CHECK,CHECK-MVEFP4 5target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"6 7define void @icmp() {8; CHECK-LABEL: 'icmp'9; CHECK-NEXT: Cost Model: Found costs of RThru:20 CodeSize:10 Lat:20 SizeLat:20 for: %v2i8 = icmp slt <2 x i8> undef, undef10; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %v4i8 = icmp slt <4 x i8> undef, undef11; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %v8i8 = icmp slt <8 x i8> undef, undef12; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %v16i8 = icmp slt <16 x i8> undef, undef13; CHECK-NEXT: Cost Model: Found costs of RThru:132 CodeSize:130 Lat:132 SizeLat:132 for: %v32i8 = icmp slt <32 x i8> undef, undef14; CHECK-NEXT: Cost Model: Found costs of RThru:20 CodeSize:10 Lat:20 SizeLat:20 for: %v2i16 = icmp slt <2 x i16> undef, undef15; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %v4i16 = icmp slt <4 x i16> undef, undef16; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %v8i16 = icmp slt <8 x i16> undef, undef17; CHECK-NEXT: Cost Model: Found costs of RThru:68 CodeSize:66 Lat:68 SizeLat:68 for: %v16i16 = icmp slt <16 x i16> undef, undef18; CHECK-NEXT: Cost Model: Found costs of RThru:20 CodeSize:10 Lat:20 SizeLat:20 for: %v2i32 = icmp slt <2 x i32> undef, undef19; CHECK-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %v4i32 = icmp slt <4 x i32> undef, undef20; CHECK-NEXT: Cost Model: Found costs of RThru:36 CodeSize:34 Lat:36 SizeLat:36 for: %v8i32 = icmp slt <8 x i32> undef, undef21; CHECK-NEXT: Cost Model: Found costs of RThru:72 CodeSize:68 Lat:72 SizeLat:72 for: %v16i32 = icmp slt <16 x i32> undef, undef22; CHECK-NEXT: Cost Model: Found costs of RThru:36 CodeSize:18 Lat:36 SizeLat:36 for: %v2i64 = icmp slt <2 x i64> undef, undef23; CHECK-NEXT: Cost Model: Found costs of RThru:72 CodeSize:36 Lat:72 SizeLat:72 for: %v4i64 = icmp slt <4 x i64> undef, undef24; CHECK-NEXT: Cost Model: Found costs of RThru:144 CodeSize:72 Lat:144 SizeLat:144 for: %v8i64 = icmp slt <8 x i64> undef, undef25; CHECK-NEXT: Cost Model: Found costs of RThru:68 CodeSize:34 Lat:68 SizeLat:68 for: %v2i128 = icmp slt <2 x i128> undef, undef26; CHECK-NEXT: Cost Model: Found costs of RThru:136 CodeSize:68 Lat:136 SizeLat:136 for: %v4i128 = icmp slt <4 x i128> undef, undef27; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void28;29 %v2i8 = icmp slt <2 x i8> undef, undef30 %v4i8 = icmp slt <4 x i8> undef, undef31 %v8i8 = icmp slt <8 x i8> undef, undef32 %v16i8 = icmp slt <16 x i8> undef, undef33 %v32i8 = icmp slt <32 x i8> undef, undef34 35 %v2i16 = icmp slt <2 x i16> undef, undef36 %v4i16 = icmp slt <4 x i16> undef, undef37 %v8i16 = icmp slt <8 x i16> undef, undef38 %v16i16 = icmp slt <16 x i16> undef, undef39 40 %v2i32 = icmp slt <2 x i32> undef, undef41 %v4i32 = icmp slt <4 x i32> undef, undef42 %v8i32 = icmp slt <8 x i32> undef, undef43 %v16i32 = icmp slt <16 x i32> undef, undef44 45 %v2i64 = icmp slt <2 x i64> undef, undef46 %v4i64 = icmp slt <4 x i64> undef, undef47 %v8i64 = icmp slt <8 x i64> undef, undef48 49 %v2i128 = icmp slt <2 x i128> undef, undef50 %v4i128 = icmp slt <4 x i128> undef, undef51 52 ret void53}54 55define void @fcmp() {56; CHECK-MVE-LABEL: 'fcmp'57; CHECK-MVE-NEXT: Cost Model: Found costs of 12 for: %v2f16 = fcmp olt <2 x half> undef, undef58; CHECK-MVE-NEXT: Cost Model: Found costs of 24 for: %v4f16 = fcmp olt <4 x half> undef, undef59; CHECK-MVE-NEXT: Cost Model: Found costs of 48 for: %v8f16 = fcmp olt <8 x half> undef, undef60; CHECK-MVE-NEXT: Cost Model: Found costs of 96 for: %v16f16 = fcmp olt <16 x half> undef, undef61; CHECK-MVE-NEXT: Cost Model: Found costs of 12 for: %v2f32 = fcmp olt <2 x float> undef, undef62; CHECK-MVE-NEXT: Cost Model: Found costs of 24 for: %v4f32 = fcmp olt <4 x float> undef, undef63; CHECK-MVE-NEXT: Cost Model: Found costs of 48 for: %v8f32 = fcmp olt <8 x float> undef, undef64; CHECK-MVE-NEXT: Cost Model: Found costs of 96 for: %v16f32 = fcmp olt <16 x float> undef, undef65; CHECK-MVE-NEXT: Cost Model: Found costs of 12 for: %v2f64 = fcmp olt <2 x double> undef, undef66; CHECK-MVE-NEXT: Cost Model: Found costs of 24 for: %v4f64 = fcmp olt <4 x double> undef, undef67; CHECK-MVE-NEXT: Cost Model: Found costs of 48 for: %v8f64 = fcmp olt <8 x double> undef, undef68; CHECK-MVE-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void69;70; CHECK-MVEFP-LABEL: 'fcmp'71; CHECK-MVEFP-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %v2f16 = fcmp olt <2 x half> undef, undef72; CHECK-MVEFP-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %v4f16 = fcmp olt <4 x half> undef, undef73; CHECK-MVEFP-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %v8f16 = fcmp olt <8 x half> undef, undef74; CHECK-MVEFP-NEXT: Cost Model: Found costs of RThru:68 CodeSize:66 Lat:68 SizeLat:68 for: %v16f16 = fcmp olt <16 x half> undef, undef75; CHECK-MVEFP-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %v2f32 = fcmp olt <2 x float> undef, undef76; CHECK-MVEFP-NEXT: Cost Model: Found costs of RThru:2 CodeSize:1 Lat:2 SizeLat:2 for: %v4f32 = fcmp olt <4 x float> undef, undef77; CHECK-MVEFP-NEXT: Cost Model: Found costs of RThru:36 CodeSize:34 Lat:36 SizeLat:36 for: %v8f32 = fcmp olt <8 x float> undef, undef78; CHECK-MVEFP-NEXT: Cost Model: Found costs of RThru:72 CodeSize:68 Lat:72 SizeLat:72 for: %v16f32 = fcmp olt <16 x float> undef, undef79; CHECK-MVEFP-NEXT: Cost Model: Found costs of RThru:8 CodeSize:4 Lat:8 SizeLat:8 for: %v2f64 = fcmp olt <2 x double> undef, undef80; CHECK-MVEFP-NEXT: Cost Model: Found costs of RThru:16 CodeSize:8 Lat:16 SizeLat:16 for: %v4f64 = fcmp olt <4 x double> undef, undef81; CHECK-MVEFP-NEXT: Cost Model: Found costs of RThru:32 CodeSize:16 Lat:32 SizeLat:32 for: %v8f64 = fcmp olt <8 x double> undef, undef82; CHECK-MVEFP-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void83;84 %v2f16 = fcmp olt <2 x half> undef, undef85 %v4f16 = fcmp olt <4 x half> undef, undef86 %v8f16 = fcmp olt <8 x half> undef, undef87 %v16f16 = fcmp olt <16 x half> undef, undef88 89 %v2f32 = fcmp olt <2 x float> undef, undef90 %v4f32 = fcmp olt <4 x float> undef, undef91 %v8f32 = fcmp olt <8 x float> undef, undef92 %v16f32 = fcmp olt <16 x float> undef, undef93 94 %v2f64 = fcmp olt <2 x double> undef, undef95 %v4f64 = fcmp olt <4 x double> undef, undef96 %v8f64 = fcmp olt <8 x double> undef, undef97 98 ret void99}100