source: icGREP/icgrep-devel/llvm-3.8.0.src/test/Analysis/CostModel/AArch64/select.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 1.5 KB
Line 
1; RUN: opt < %s  -cost-model -analyze -mtriple=arm64-apple-ios -mcpu=cyclone | FileCheck %s
2target 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"
3
4; CHECK-LABEL: select
5define void @select() {
6    ; Scalar values
7  ; CHECK: cost of 1 {{.*}} select
8  %v1 = select i1 undef, i8 undef, i8 undef
9  ; CHECK: cost of 1 {{.*}} select
10  %v2 = select i1 undef, i16 undef, i16 undef
11  ; CHECK: cost of 1 {{.*}} select
12  %v3 = select i1 undef, i32 undef, i32 undef
13  ; CHECK: cost of 1 {{.*}} select
14  %v4 = select i1 undef, i64 undef, i64 undef
15  ; CHECK: cost of 1 {{.*}} select
16  %v5 = select i1 undef, float undef, float undef
17  ; CHECK: cost of 1 {{.*}} select
18  %v6 = select i1 undef, double undef, double undef
19
20  ; CHECK: cost of 16 {{.*}} select
21  %v13b = select <16 x i1>  undef, <16 x i16> undef, <16 x i16> undef
22
23  ; CHECK: cost of 8 {{.*}} select
24  %v15b = select <8 x i1>  undef, <8 x i32> undef, <8 x i32> undef
25  ; CHECK: cost of 16 {{.*}} select
26  %v15c = select <16 x i1>  undef, <16 x i32> undef, <16 x i32> undef
27
28  ; Vector values - check for vectors of i64s that have a high cost because
29  ; they end up scalarized.
30  ; CHECK: cost of 80 {{.*}} select
31  %v16a = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef
32  ; CHECK: cost of 160 {{.*}} select
33  %v16b = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef
34  ; CHECK: cost of 320 {{.*}} select
35  %v16c = select <16 x i1> undef, <16 x i64> undef, <16 x i64> undef
36
37  ret void
38}
Note: See TracBrowser for help on using the repository browser.