AArch64/ARM64: move ARM64 into AArch64's place
[oota-llvm.git] / test / Analysis / CostModel / AArch64 / select.ll
1 ; RUN: opt < %s  -cost-model -analyze -mtriple=arm64-apple-ios -mcpu=cyclone | FileCheck %s
2 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"
3
4 ; CHECK-LABEL: select
5 define 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   ; Vector values - check for vectors that have a high cost because they end up
21   ; scalarized.
22   ; CHECK: cost of 320 {{.*}} select
23   %v13b = select <16 x i1>  undef, <16 x i16> undef, <16 x i16> undef
24
25   ; CHECK: cost of 160 {{.*}} select
26   %v15b = select <8 x i1>  undef, <8 x i32> undef, <8 x i32> undef
27   ; CHECK: cost of 320 {{.*}} select
28   %v15c = select <16 x i1>  undef, <16 x i32> undef, <16 x i32> undef
29
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 }