| ; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py |
| ; RUN: opt -passes="print<cost-model>" 2>&1 -disable-output -cost-kind=all -mtriple=aarch64 < %s | FileCheck %s |
| |
| target 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" |
| |
| define void @select() { |
| ; CHECK-LABEL: 'select' |
| ; CHECK-NEXT: Cost Model: Found costs of 1 for: %v1 = select i1 undef, i8 undef, i8 undef |
| ; CHECK-NEXT: Cost Model: Found costs of 1 for: %v2 = select i1 undef, i16 undef, i16 undef |
| ; CHECK-NEXT: Cost Model: Found costs of 1 for: %v3 = select i1 undef, i32 undef, i32 undef |
| ; CHECK-NEXT: Cost Model: Found costs of 1 for: %v4 = select i1 undef, i64 undef, i64 undef |
| ; CHECK-NEXT: Cost Model: Found costs of 1 for: %v5 = select i1 undef, float undef, float undef |
| ; CHECK-NEXT: Cost Model: Found costs of 1 for: %v6 = select i1 undef, double undef, double undef |
| ; CHECK-NEXT: Cost Model: Found costs of 16 for: %v13b = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef |
| ; CHECK-NEXT: Cost Model: Found costs of 8 for: %v15b = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef |
| ; CHECK-NEXT: Cost Model: Found costs of 16 for: %v15c = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef |
| ; CHECK-NEXT: Cost Model: Found costs of 80 for: %v16a = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef |
| ; CHECK-NEXT: Cost Model: Found costs of 160 for: %v16b = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef |
| ; CHECK-NEXT: Cost Model: Found costs of 320 for: %v16c = select <16 x i1> undef, <16 x i64> undef, <16 x i64> undef |
| ; CHECK-NEXT: Cost Model: Found costs of 2 for: %v2float = select <2 x i1> undef, <2 x float> undef, <2 x float> undef |
| ; CHECK-NEXT: Cost Model: Found costs of 2 for: %v4float = select <4 x i1> undef, <4 x float> undef, <4 x float> undef |
| ; CHECK-NEXT: Cost Model: Found costs of 2 for: %v2double = select <2 x i1> undef, <2 x double> undef, <2 x double> undef |
| ; CHECK-NEXT: Cost Model: Found costs of 2 for: %v4half = select <4 x i1> undef, <4 x half> undef, <4 x half> undef |
| ; CHECK-NEXT: Cost Model: Found costs of 2 for: %v8half = select <8 x i1> undef, <8 x half> undef, <8 x half> undef |
| ; CHECK-NEXT: Cost Model: Found costs of RThru:0 CodeSize:1 Lat:1 SizeLat:1 for: ret void |
| ; |
| %v1 = select i1 undef, i8 undef, i8 undef |
| %v2 = select i1 undef, i16 undef, i16 undef |
| %v3 = select i1 undef, i32 undef, i32 undef |
| %v4 = select i1 undef, i64 undef, i64 undef |
| %v5 = select i1 undef, float undef, float undef |
| %v6 = select i1 undef, double undef, double undef |
| |
| %v13b = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef |
| |
| %v15b = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef |
| %v15c = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef |
| |
| ; Vector values - check for vectors of i64s that have a high cost because |
| ; they end up scalarized. |
| %v16a = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef |
| %v16b = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef |
| %v16c = select <16 x i1> undef, <16 x i64> undef, <16 x i64> undef |
| |
| ; simd vector float |
| %v2float = select <2 x i1> undef, <2 x float> undef, <2 x float> undef |
| %v4float = select <4 x i1> undef, <4 x float> undef, <4 x float> undef |
| %v2double = select <2 x i1> undef, <2 x double> undef, <2 x double> undef |
| %v4half = select <4 x i1> undef, <4 x half> undef, <4 x half> undef |
| %v8half = select <8 x i1> undef, <8 x half> undef, <8 x half> undef |
| ret void |
| } |