Imported Upstream version 5.18.0.167

Former-commit-id: 289509151e0fee68a1b591a20c9f109c3c789d3a
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-10-20 08:25:10 +00:00
parent e19d552987
commit b084638f15
28489 changed files with 184 additions and 3866856 deletions

View File

@ -1,14 +0,0 @@
; RUN: opt < %s -cost-model -analyze -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -mattr=-vsx | FileCheck %s
target datalayout = "E-m:e-i64:64-n32:64"
target triple = "powerpc64-unknown-linux-gnu"
define void @exts() {
; VSX is disabled, so this cost needs to include scalarization (because
; <4 x double> is legalized to scalars).
; CHECK: cost of 44 {{.*}} fcmp
%v1 = fcmp ugt <4 x double> undef, undef
ret void
}

View File

@ -1,21 +0,0 @@
; RUN: opt < %s -cost-model -analyze -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 -mattr=+vsx | FileCheck %s
target datalayout = "E-m:e-i64:64-n32:64"
target triple = "powerpc64-unknown-linux-gnu"
define void @exts() {
; CHECK: cost of 1 {{.*}} sext
%v1 = sext i16 undef to i32
; CHECK: cost of 1 {{.*}} sext
%v2 = sext <2 x i16> undef to <2 x i32>
; CHECK: cost of 1 {{.*}} sext
%v3 = sext <4 x i16> undef to <4 x i32>
; CHECK: cost of 3 {{.*}} sext
%v4 = sext <8 x i16> undef to <8 x i32>
ret void
}

View File

@ -1,16 +0,0 @@
; RUN: opt < %s -cost-model -analyze -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 | FileCheck %s
target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
target triple = "powerpc64-unknown-linux-gnu"
define i32 @insert(i32 %arg) {
; CHECK: cost of 10 {{.*}} insertelement
%x = insertelement <4 x i32> undef, i32 %arg, i32 0
ret i32 undef
}
define i32 @extract(<4 x i32> %arg) {
; CHECK: cost of 3 {{.*}} extractelement
%x = extractelement <4 x i32> %arg, i32 0
ret i32 %x
}

View File

@ -1,3 +0,0 @@
if not 'PowerPC' in config.root.targets:
config.unsupported = True

View File

@ -1,45 +0,0 @@
; RUN: opt < %s -cost-model -analyze -mtriple=powerpc64-unknown-linux-gnu -mcpu=g5 -disable-ppc-unaligned | FileCheck %s
target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
target triple = "powerpc64-unknown-linux-gnu"
define i32 @stores(i32 %arg) {
; CHECK: cost of 1 {{.*}} store
store i8 undef, i8* undef, align 4
; CHECK: cost of 1 {{.*}} store
store i16 undef, i16* undef, align 4
; CHECK: cost of 1 {{.*}} store
store i32 undef, i32* undef, align 4
; CHECK: cost of 2 {{.*}} store
store i64 undef, i64* undef, align 4
; CHECK: cost of 4 {{.*}} store
store i128 undef, i128* undef, align 4
ret i32 undef
}
define i32 @loads(i32 %arg) {
; CHECK: cost of 1 {{.*}} load
load i8, i8* undef, align 4
; CHECK: cost of 1 {{.*}} load
load i16, i16* undef, align 4
; CHECK: cost of 1 {{.*}} load
load i32, i32* undef, align 4
; CHECK: cost of 2 {{.*}} load
load i64, i64* undef, align 4
; CHECK: cost of 4 {{.*}} load
load i128, i128* undef, align 4
; FIXME: There actually are sub-vector Altivec loads, and so we could handle
; this with a small expense, but we don't currently.
; CHECK: cost of 42 {{.*}} load
load <4 x i16>, <4 x i16>* undef, align 2
; CHECK: cost of 2 {{.*}} load
load <4 x i32>, <4 x i32>* undef, align 4
; CHECK: cost of 46 {{.*}} load
load <3 x float>, <3 x float>* undef, align 1
ret i32 undef
}

View File

@ -1,11 +0,0 @@
; RUN: opt < %s -cost-model -analyze -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr8 | FileCheck %s
target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
target triple = "powerpc64-unknown-linux-gnu"
define <4 x i32> @test1(<4 x i32> %arg) {
; CHECK: cost of 1 {{.*}} call <4 x i32> @llvm.ctpop.v4i32
%ctpop = call <4 x i32> @llvm.ctpop.v4i32(<4 x i32> %arg)
ret <4 x i32> %ctpop
}
declare <4 x i32> @llvm.ctpop.v4i32(<4 x i32>)

View File

@ -1,404 +0,0 @@
; RUN: opt < %s -cost-model -analyze | FileCheck %s
target datalayout = "E-m:e-i64:64-n32:64"
target triple = "powerpc64-unknown-linux-gnu"
define <16 x i8> @test_l_v16i8(<16 x i8>* %p) #0 {
entry:
%r = load <16 x i8>, <16 x i8>* %p, align 1
ret <16 x i8> %r
; CHECK-LABEL: test_l_v16i8
; CHECK: cost of 2 for instruction: %r = load <16 x i8>, <16 x i8>* %p, align 1
}
define <32 x i8> @test_l_v32i8(<32 x i8>* %p) #0 {
entry:
%r = load <32 x i8>, <32 x i8>* %p, align 1
ret <32 x i8> %r
; CHECK-LABEL: test_l_v32i8
; CHECK: cost of 4 for instruction: %r = load <32 x i8>, <32 x i8>* %p, align 1
}
define <8 x i16> @test_l_v8i16(<8 x i16>* %p) #0 {
entry:
%r = load <8 x i16>, <8 x i16>* %p, align 2
ret <8 x i16> %r
; CHECK-LABEL: test_l_v8i16
; CHECK: cost of 2 for instruction: %r = load <8 x i16>, <8 x i16>* %p, align 2
}
define <16 x i16> @test_l_v16i16(<16 x i16>* %p) #0 {
entry:
%r = load <16 x i16>, <16 x i16>* %p, align 2
ret <16 x i16> %r
; CHECK-LABEL: test_l_v16i16
; CHECK: cost of 4 for instruction: %r = load <16 x i16>, <16 x i16>* %p, align 2
}
define <4 x i32> @test_l_v4i32(<4 x i32>* %p) #0 {
entry:
%r = load <4 x i32>, <4 x i32>* %p, align 4
ret <4 x i32> %r
; CHECK-LABEL: test_l_v4i32
; CHECK: cost of 2 for instruction: %r = load <4 x i32>, <4 x i32>* %p, align 4
}
define <8 x i32> @test_l_v8i32(<8 x i32>* %p) #0 {
entry:
%r = load <8 x i32>, <8 x i32>* %p, align 4
ret <8 x i32> %r
; CHECK-LABEL: test_l_v8i32
; CHECK: cost of 4 for instruction: %r = load <8 x i32>, <8 x i32>* %p, align 4
}
define <2 x i64> @test_l_v2i64(<2 x i64>* %p) #0 {
entry:
%r = load <2 x i64>, <2 x i64>* %p, align 8
ret <2 x i64> %r
; CHECK-LABEL: test_l_v2i64
; CHECK: cost of 1 for instruction: %r = load <2 x i64>, <2 x i64>* %p, align 8
}
define <4 x i64> @test_l_v4i64(<4 x i64>* %p) #0 {
entry:
%r = load <4 x i64>, <4 x i64>* %p, align 8
ret <4 x i64> %r
; CHECK-LABEL: test_l_v4i64
; CHECK: cost of 2 for instruction: %r = load <4 x i64>, <4 x i64>* %p, align 8
}
define <4 x float> @test_l_v4float(<4 x float>* %p) #0 {
entry:
%r = load <4 x float>, <4 x float>* %p, align 4
ret <4 x float> %r
; CHECK-LABEL: test_l_v4float
; CHECK: cost of 2 for instruction: %r = load <4 x float>, <4 x float>* %p, align 4
}
define <8 x float> @test_l_v8float(<8 x float>* %p) #0 {
entry:
%r = load <8 x float>, <8 x float>* %p, align 4
ret <8 x float> %r
; CHECK-LABEL: test_l_v8float
; CHECK: cost of 4 for instruction: %r = load <8 x float>, <8 x float>* %p, align 4
}
define <2 x double> @test_l_v2double(<2 x double>* %p) #0 {
entry:
%r = load <2 x double>, <2 x double>* %p, align 8
ret <2 x double> %r
; CHECK-LABEL: test_l_v2double
; CHECK: cost of 1 for instruction: %r = load <2 x double>, <2 x double>* %p, align 8
}
define <4 x double> @test_l_v4double(<4 x double>* %p) #0 {
entry:
%r = load <4 x double>, <4 x double>* %p, align 8
ret <4 x double> %r
; CHECK-LABEL: test_l_v4double
; CHECK: cost of 2 for instruction: %r = load <4 x double>, <4 x double>* %p, align 8
}
define <16 x i8> @test_l_p8v16i8(<16 x i8>* %p) #2 {
entry:
%r = load <16 x i8>, <16 x i8>* %p, align 1
ret <16 x i8> %r
; CHECK-LABEL: test_l_p8v16i8
; CHECK: cost of 1 for instruction: %r = load <16 x i8>, <16 x i8>* %p, align 1
}
define <32 x i8> @test_l_p8v32i8(<32 x i8>* %p) #2 {
entry:
%r = load <32 x i8>, <32 x i8>* %p, align 1
ret <32 x i8> %r
; CHECK-LABEL: test_l_p8v32i8
; CHECK: cost of 2 for instruction: %r = load <32 x i8>, <32 x i8>* %p, align 1
}
define <8 x i16> @test_l_p8v8i16(<8 x i16>* %p) #2 {
entry:
%r = load <8 x i16>, <8 x i16>* %p, align 2
ret <8 x i16> %r
; CHECK-LABEL: test_l_p8v8i16
; CHECK: cost of 1 for instruction: %r = load <8 x i16>, <8 x i16>* %p, align 2
}
define <16 x i16> @test_l_p8v16i16(<16 x i16>* %p) #2 {
entry:
%r = load <16 x i16>, <16 x i16>* %p, align 2
ret <16 x i16> %r
; CHECK-LABEL: test_l_p8v16i16
; CHECK: cost of 2 for instruction: %r = load <16 x i16>, <16 x i16>* %p, align 2
}
define <4 x i32> @test_l_p8v4i32(<4 x i32>* %p) #2 {
entry:
%r = load <4 x i32>, <4 x i32>* %p, align 4
ret <4 x i32> %r
; CHECK-LABEL: test_l_p8v4i32
; CHECK: cost of 1 for instruction: %r = load <4 x i32>, <4 x i32>* %p, align 4
}
define <8 x i32> @test_l_p8v8i32(<8 x i32>* %p) #2 {
entry:
%r = load <8 x i32>, <8 x i32>* %p, align 4
ret <8 x i32> %r
; CHECK-LABEL: test_l_p8v8i32
; CHECK: cost of 2 for instruction: %r = load <8 x i32>, <8 x i32>* %p, align 4
}
define <2 x i64> @test_l_p8v2i64(<2 x i64>* %p) #2 {
entry:
%r = load <2 x i64>, <2 x i64>* %p, align 8
ret <2 x i64> %r
; CHECK-LABEL: test_l_p8v2i64
; CHECK: cost of 1 for instruction: %r = load <2 x i64>, <2 x i64>* %p, align 8
}
define <4 x i64> @test_l_p8v4i64(<4 x i64>* %p) #2 {
entry:
%r = load <4 x i64>, <4 x i64>* %p, align 8
ret <4 x i64> %r
; CHECK-LABEL: test_l_p8v4i64
; CHECK: cost of 2 for instruction: %r = load <4 x i64>, <4 x i64>* %p, align 8
}
define <4 x float> @test_l_p8v4float(<4 x float>* %p) #2 {
entry:
%r = load <4 x float>, <4 x float>* %p, align 4
ret <4 x float> %r
; CHECK-LABEL: test_l_p8v4float
; CHECK: cost of 1 for instruction: %r = load <4 x float>, <4 x float>* %p, align 4
}
define <8 x float> @test_l_p8v8float(<8 x float>* %p) #2 {
entry:
%r = load <8 x float>, <8 x float>* %p, align 4
ret <8 x float> %r
; CHECK-LABEL: test_l_p8v8float
; CHECK: cost of 2 for instruction: %r = load <8 x float>, <8 x float>* %p, align 4
}
define <2 x double> @test_l_p8v2double(<2 x double>* %p) #2 {
entry:
%r = load <2 x double>, <2 x double>* %p, align 8
ret <2 x double> %r
; CHECK-LABEL: test_l_p8v2double
; CHECK: cost of 1 for instruction: %r = load <2 x double>, <2 x double>* %p, align 8
}
define <4 x double> @test_l_p8v4double(<4 x double>* %p) #2 {
entry:
%r = load <4 x double>, <4 x double>* %p, align 8
ret <4 x double> %r
; CHECK-LABEL: test_l_p8v4double
; CHECK: cost of 2 for instruction: %r = load <4 x double>, <4 x double>* %p, align 8
}
define <4 x float> @test_l_qv4float(<4 x float>* %p) #1 {
entry:
%r = load <4 x float>, <4 x float>* %p, align 4
ret <4 x float> %r
; CHECK-LABEL: test_l_qv4float
; CHECK: cost of 2 for instruction: %r = load <4 x float>, <4 x float>* %p, align 4
}
define <8 x float> @test_l_qv8float(<8 x float>* %p) #1 {
entry:
%r = load <8 x float>, <8 x float>* %p, align 4
ret <8 x float> %r
; CHECK-LABEL: test_l_qv8float
; CHECK: cost of 4 for instruction: %r = load <8 x float>, <8 x float>* %p, align 4
}
define <4 x double> @test_l_qv4double(<4 x double>* %p) #1 {
entry:
%r = load <4 x double>, <4 x double>* %p, align 8
ret <4 x double> %r
; CHECK-LABEL: test_l_qv4double
; CHECK: cost of 2 for instruction: %r = load <4 x double>, <4 x double>* %p, align 8
}
define <8 x double> @test_l_qv8double(<8 x double>* %p) #1 {
entry:
%r = load <8 x double>, <8 x double>* %p, align 8
ret <8 x double> %r
; CHECK-LABEL: test_l_qv8double
; CHECK: cost of 4 for instruction: %r = load <8 x double>, <8 x double>* %p, align 8
}
define void @test_s_v16i8(<16 x i8>* %p, <16 x i8> %v) #0 {
entry:
store <16 x i8> %v, <16 x i8>* %p, align 1
ret void
; CHECK-LABEL: test_s_v16i8
; CHECK: cost of 1 for instruction: store <16 x i8> %v, <16 x i8>* %p, align 1
}
define void @test_s_v32i8(<32 x i8>* %p, <32 x i8> %v) #0 {
entry:
store <32 x i8> %v, <32 x i8>* %p, align 1
ret void
; CHECK-LABEL: test_s_v32i8
; CHECK: cost of 2 for instruction: store <32 x i8> %v, <32 x i8>* %p, align 1
}
define void @test_s_v8i16(<8 x i16>* %p, <8 x i16> %v) #0 {
entry:
store <8 x i16> %v, <8 x i16>* %p, align 2
ret void
; CHECK-LABEL: test_s_v8i16
; CHECK: cost of 1 for instruction: store <8 x i16> %v, <8 x i16>* %p, align 2
}
define void @test_s_v16i16(<16 x i16>* %p, <16 x i16> %v) #0 {
entry:
store <16 x i16> %v, <16 x i16>* %p, align 2
ret void
; CHECK-LABEL: test_s_v16i16
; CHECK: cost of 2 for instruction: store <16 x i16> %v, <16 x i16>* %p, align 2
}
define void @test_s_v4i32(<4 x i32>* %p, <4 x i32> %v) #0 {
entry:
store <4 x i32> %v, <4 x i32>* %p, align 4
ret void
; CHECK-LABEL: test_s_v4i32
; CHECK: cost of 1 for instruction: store <4 x i32> %v, <4 x i32>* %p, align 4
}
define void @test_s_v8i32(<8 x i32>* %p, <8 x i32> %v) #0 {
entry:
store <8 x i32> %v, <8 x i32>* %p, align 4
ret void
; CHECK-LABEL: test_s_v8i32
; CHECK: cost of 2 for instruction: store <8 x i32> %v, <8 x i32>* %p, align 4
}
define void @test_s_v2i64(<2 x i64>* %p, <2 x i64> %v) #0 {
entry:
store <2 x i64> %v, <2 x i64>* %p, align 8
ret void
; CHECK-LABEL: test_s_v2i64
; CHECK: cost of 1 for instruction: store <2 x i64> %v, <2 x i64>* %p, align 8
}
define void @test_s_v4i64(<4 x i64>* %p, <4 x i64> %v) #0 {
entry:
store <4 x i64> %v, <4 x i64>* %p, align 8
ret void
; CHECK-LABEL: test_s_v4i64
; CHECK: cost of 2 for instruction: store <4 x i64> %v, <4 x i64>* %p, align 8
}
define void @test_s_v4float(<4 x float>* %p, <4 x float> %v) #0 {
entry:
store <4 x float> %v, <4 x float>* %p, align 4
ret void
; CHECK-LABEL: test_s_v4float
; CHECK: cost of 1 for instruction: store <4 x float> %v, <4 x float>* %p, align 4
}
define void @test_s_v8float(<8 x float>* %p, <8 x float> %v) #0 {
entry:
store <8 x float> %v, <8 x float>* %p, align 4
ret void
; CHECK-LABEL: test_s_v8float
; CHECK: cost of 2 for instruction: store <8 x float> %v, <8 x float>* %p, align 4
}
define void @test_s_v2double(<2 x double>* %p, <2 x double> %v) #0 {
entry:
store <2 x double> %v, <2 x double>* %p, align 8
ret void
; CHECK-LABEL: test_s_v2double
; CHECK: cost of 1 for instruction: store <2 x double> %v, <2 x double>* %p, align 8
}
define void @test_s_v4double(<4 x double>* %p, <4 x double> %v) #0 {
entry:
store <4 x double> %v, <4 x double>* %p, align 8
ret void
; CHECK-LABEL: test_s_v4double
; CHECK: cost of 2 for instruction: store <4 x double> %v, <4 x double>* %p, align 8
}
define void @test_s_qv4float(<4 x float>* %p, <4 x float> %v) #1 {
entry:
store <4 x float> %v, <4 x float>* %p, align 4
ret void
; CHECK-LABEL: test_s_qv4float
; CHECK: cost of 7 for instruction: store <4 x float> %v, <4 x float>* %p, align 4
}
define void @test_s_qv8float(<8 x float>* %p, <8 x float> %v) #1 {
entry:
store <8 x float> %v, <8 x float>* %p, align 4
ret void
; CHECK-LABEL: test_s_qv8float
; CHECK: cost of 15 for instruction: store <8 x float> %v, <8 x float>* %p, align 4
}
define void @test_s_qv4double(<4 x double>* %p, <4 x double> %v) #1 {
entry:
store <4 x double> %v, <4 x double>* %p, align 8
ret void
; CHECK-LABEL: test_s_qv4double
; CHECK: cost of 7 for instruction: store <4 x double> %v, <4 x double>* %p, align 8
}
define void @test_s_qv8double(<8 x double>* %p, <8 x double> %v) #1 {
entry:
store <8 x double> %v, <8 x double>* %p, align 8
ret void
; CHECK-LABEL: test_s_qv8double
; CHECK: cost of 15 for instruction: store <8 x double> %v, <8 x double>* %p, align 8
}
attributes #0 = { nounwind "target-cpu"="pwr7" }
attributes #1 = { nounwind "target-cpu"="a2q" }
attributes #2 = { nounwind "target-cpu"="pwr8" }

View File

@ -1,26 +0,0 @@
; RUN: opt < %s -cost-model -analyze -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr8 -mattr=+vsx | FileCheck %s
target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
target triple = "powerpc64-unknown-linux-gnu"
define i32 @test(i32 %arg) {
; CHECK: cost of 1 {{.*}} load
load i8, i8* undef, align 1
; CHECK: cost of 1 {{.*}} load
load i16, i16* undef, align 1
; CHECK: cost of 1 {{.*}} load
load i32, i32* undef, align 1
; CHECK: cost of 1 {{.*}} load
load i64, i64* undef, align 1
; CHECK: cost of 1 {{.*}} store
store i8 undef, i8* undef, align 1
; CHECK: cost of 1 {{.*}} store
store i16 undef, i16* undef, align 1
; CHECK: cost of 1 {{.*}} store
store i32 undef, i32* undef, align 1
; CHECK: cost of 1 {{.*}} store
store i64 undef, i64* undef, align 1
ret i32 undef
}

View File

@ -1,19 +0,0 @@
; RUN: opt < %s -cost-model -analyze -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr8 -mattr=+vsx | FileCheck %s
target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
target triple = "powerpc64-unknown-linux-gnu"
define i32 @loads(i32 %arg) {
; CHECK: cost of 1 {{.*}} load
load <4 x i8>, <4 x i8>* undef, align 1
; CHECK: cost of 1 {{.*}} load
load <8 x i8>, <8 x i8>* undef, align 1
; CHECK: cost of 1 {{.*}} load
load <2 x i16>, <2 x i16>* undef, align 2
; CHECK: cost of 1 {{.*}} load
load <4 x i16>, <4 x i16>* undef, align 2
ret i32 undef
}