53 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-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32-S32"5 6define void @select() {7; CHECK-LABEL: 'select'8; CHECK-NEXT: Cost Model: Found costs of 1 for: %v1 = select i1 undef, i8 undef, i8 undef9; CHECK-NEXT: Cost Model: Found costs of 1 for: %v2 = select i1 undef, i16 undef, i16 undef10; CHECK-NEXT: Cost Model: Found costs of 1 for: %v3 = select i1 undef, i32 undef, i32 undef11; CHECK-NEXT: Cost Model: Found costs of 1 for: %v4 = select i1 undef, i64 undef, i64 undef12; CHECK-NEXT: Cost Model: Found costs of 1 for: %v5 = select i1 undef, float undef, float undef13; CHECK-NEXT: Cost Model: Found costs of 1 for: %v6 = select i1 undef, double undef, double undef14; CHECK-NEXT: Cost Model: Found costs of 16 for: %v13b = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef15; CHECK-NEXT: Cost Model: Found costs of 8 for: %v15b = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef16; CHECK-NEXT: Cost Model: Found costs of 16 for: %v15c = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef17; CHECK-NEXT: Cost Model: Found costs of 80 for: %v16a = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef18; CHECK-NEXT: Cost Model: Found costs of 160 for: %v16b = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef19; CHECK-NEXT: Cost Model: Found costs of 320 for: %v16c = select <16 x i1> undef, <16 x i64> undef, <16 x i64> undef20; CHECK-NEXT: Cost Model: Found costs of 2 for: %v2float = select <2 x i1> undef, <2 x float> undef, <2 x float> undef21; CHECK-NEXT: Cost Model: Found costs of 2 for: %v4float = select <4 x i1> undef, <4 x float> undef, <4 x float> undef22; CHECK-NEXT: Cost Model: Found costs of 2 for: %v2double = select <2 x i1> undef, <2 x double> undef, <2 x double> undef23; CHECK-NEXT: Cost Model: Found costs of 2 for: %v4half = select <4 x i1> undef, <4 x half> undef, <4 x half> undef24; CHECK-NEXT: Cost Model: Found costs of 2 for: %v8half = select <8 x i1> undef, <8 x half> undef, <8 x half> undef25; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void26;27 %v1 = select i1 undef, i8 undef, i8 undef28 %v2 = select i1 undef, i16 undef, i16 undef29 %v3 = select i1 undef, i32 undef, i32 undef30 %v4 = select i1 undef, i64 undef, i64 undef31 %v5 = select i1 undef, float undef, float undef32 %v6 = select i1 undef, double undef, double undef33 34 %v13b = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef35 36 %v15b = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef37 %v15c = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef38 39 ; Vector values - check for vectors of i64s that have a high cost because40 ; they end up scalarized.41 %v16a = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef42 %v16b = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef43 %v16c = select <16 x i1> undef, <16 x i64> undef, <16 x i64> undef44 45 ; simd vector float46 %v2float = select <2 x i1> undef, <2 x float> undef, <2 x float> undef47 %v4float = select <4 x i1> undef, <4 x float> undef, <4 x float> undef48 %v2double = select <2 x i1> undef, <2 x double> undef, <2 x double> undef49 %v4half = select <4 x i1> undef, <4 x half> undef, <4 x half> undef50 %v8half = select <8 x i1> undef, <8 x half> undef, <8 x half> undef51 ret void52}53