Imported Upstream version 5.18.0.207

Former-commit-id: 3b152f462918d427ce18620a2cbe4f8b79650449
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2018-11-17 08:23:10 +00:00
parent 8e12397d70
commit eb85e2fc17
28480 changed files with 72 additions and 3866936 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,154 +0,0 @@
; RUN: opt < %s -cost-model -analyze -mtriple=systemz-unknown -mcpu=z13 | FileCheck %s
; Scalar sdiv
define i64 @fun0(i64 %a) {
%r = sdiv i64 %a, 2
ret i64 %r
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv i64 %a, 2
}
define i64 @fun1(i64 %a) {
%r = sdiv i64 %a, -4
ret i64 %r
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv i64 %a, -4
}
define i32 @fun2(i32 %a) {
%r = sdiv i32 %a, 8
ret i32 %r
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv i32 %a, 8
}
define i32 @fun3(i32 %a) {
%r = sdiv i32 %a, -16
ret i32 %r
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv i32 %a, -16
}
define i16 @fun4(i16 %a) {
%r = sdiv i16 %a, 32
ret i16 %r
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv i16 %a, 32
}
define i16 @fun5(i16 %a) {
%r = sdiv i16 %a, -64
ret i16 %r
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv i16 %a, -64
}
define i8 @fun6(i8 %a) {
%r = sdiv i8 %a, 64
ret i8 %r
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv i8 %a, 64
}
define i8 @fun7(i8 %a) {
%r = sdiv i8 %a, -128
ret i8 %r
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv i8 %a, -128
}
; Vector sdiv
define <2 x i64> @fun8(<2 x i64> %a) {
%r = sdiv <2 x i64> %a, <i64 2, i64 2>
ret <2 x i64> %r
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv <2 x i64> %a, <i64 2, i64 2>
}
define <2 x i64> @fun9(<2 x i64> %a) {
%r = sdiv <2 x i64> %a, <i64 -4, i64 -4>
ret <2 x i64> %r
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv <2 x i64> %a, <i64 -4, i64 -4>
}
define <4 x i32> @fun10(<4 x i32> %a) {
%r = sdiv <4 x i32> %a, <i32 8, i32 8, i32 8, i32 8>
ret <4 x i32> %r
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv <4 x i32> %a, <i32 8, i32 8, i32 8, i32 8>
}
define <4 x i32> @fun11(<4 x i32> %a) {
%r = sdiv <4 x i32> %a, <i32 -16, i32 -16, i32 -16, i32 -16>
ret <4 x i32> %r
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv <4 x i32> %a, <i32 -16
}
define <8 x i16> @fun12(<8 x i16> %a) {
%r = sdiv <8 x i16> %a, <i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32>
ret <8 x i16> %r
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv <8 x i16> %a, <i16 32
}
define <8 x i16> @fun13(<8 x i16> %a) {
%r = sdiv <8 x i16> %a, <i16 -64, i16 -64, i16 -64, i16 -64, i16 -64, i16 -64, i16 -64, i16 -64>
ret <8 x i16> %r
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv <8 x i16> %a, <i16 -64
}
define <16 x i8> @fun14(<16 x i8> %a) {
%r = sdiv <16 x i8> %a, <i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64, i8 64>
ret <16 x i8> %r
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv <16 x i8> %a, <i8 64
}
define <16 x i8> @fun15(<16 x i8> %a) {
%r = sdiv <16 x i8> %a, <i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128, i8 -128>
ret <16 x i8> %r
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %r = sdiv <16 x i8> %a, <i8 -128
}
; Scalar udiv
define i64 @fun16(i64 %a) {
%r = udiv i64 %a, 2
ret i64 %r
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %r = udiv i64 %a, 2
}
define i32 @fun17(i32 %a) {
%r = udiv i32 %a, 8
ret i32 %r
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %r = udiv i32 %a, 8
}
define i16 @fun18(i16 %a) {
%r = udiv i16 %a, 32
ret i16 %r
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %r = udiv i16 %a, 32
}
define i8 @fun19(i8 %a) {
%r = udiv i8 %a, 128
ret i8 %r
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %r = udiv i8 %a, -128
}
; Vector udiv
define <2 x i64> @fun20(<2 x i64> %a) {
%r = udiv <2 x i64> %a, <i64 2, i64 2>
ret <2 x i64> %r
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %r = udiv <2 x i64> %a, <i64 2
}
define <4 x i32> @fun21(<4 x i32> %a) {
%r = udiv <4 x i32> %a, <i32 8, i32 8, i32 8, i32 8>
ret <4 x i32> %r
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %r = udiv <4 x i32> %a, <i32 8
}
define <8 x i16> @fun22(<8 x i16> %a) {
%r = udiv <8 x i16> %a, <i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32, i16 32>
ret <8 x i16> %r
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %r = udiv <8 x i16> %a, <i16 32
}
define <16 x i8> @fun23(<16 x i8> %a) {
%r = udiv <16 x i8> %a, <i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128, i8 128>
ret <16 x i8> %r
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %r = udiv <16 x i8> %a, <i8 -128
}

View File

@@ -1,56 +0,0 @@
; RUN: opt < %s -cost-model -analyze -mtriple=systemz-unknown -mcpu=z13 | FileCheck %s
;
; Test that an extension of a load does not get an additional cost in cases
; where the load performs the extension.
define void @sext() {
%li8 = load i8, i8* undef
sext i8 %li8 to i16
sext i8 %li8 to i32
sext i8 %li8 to i64
%li16 = load i16, i16* undef
sext i16 %li16 to i32
sext i16 %li16 to i64
%li32 = load i32, i32* undef
sext i32 %li32 to i64
ret void
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li8 = load i8, i8* undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %1 = sext i8 %li8 to i16
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %2 = sext i8 %li8 to i32
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %3 = sext i8 %li8 to i64
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li16 = load i16, i16* undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %4 = sext i16 %li16 to i32
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %5 = sext i16 %li16 to i64
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li32 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %6 = sext i32 %li32 to i64
}
define void @zext() {
%li8 = load i8, i8* undef
zext i8 %li8 to i16
zext i8 %li8 to i32
zext i8 %li8 to i64
%li16 = load i16, i16* undef
zext i16 %li16 to i32
zext i16 %li16 to i64
%li32 = load i32, i32* undef
zext i32 %li32 to i64
ret void
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li8 = load i8, i8* undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %1 = zext i8 %li8 to i16
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %2 = zext i8 %li8 to i32
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %3 = zext i8 %li8 to i64
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li16 = load i16, i16* undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %4 = zext i16 %li16 to i32
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %5 = zext i16 %li16 to i64
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li32 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %6 = zext i32 %li32 to i64
}

View File

@@ -1,138 +0,0 @@
; RUN: opt < %s -cost-model -analyze -mtriple=systemz-unknown -mcpu=z13 \
; RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK-Z13 %s
; RUN: opt < %s -cost-model -analyze -mtriple=systemz-unknown -mcpu=z14 \
; RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK-Z14 %s
;
; Note: The scalarized vector instructions cost is not including any
; extracts, due to the undef operands
;
; Note: FRem is implemented with libcall, so not included here.
define void @fadd() {
%res0 = fadd float undef, undef
%res1 = fadd double undef, undef
%res2 = fadd fp128 undef, undef
%res3 = fadd <2 x float> undef, undef
%res4 = fadd <2 x double> undef, undef
%res5 = fadd <4 x float> undef, undef
%res6 = fadd <4 x double> undef, undef
%res7 = fadd <8 x float> undef, undef
%res8 = fadd <8 x double> undef, undef
%res9 = fadd <16 x float> undef, undef
%res10 = fadd <16 x double> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res0 = fadd float undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res1 = fadd double undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res2 = fadd fp128 undef, undef
; CHECK-Z13: Cost Model: Found an estimated cost of 8 for instruction: %res3 = fadd <2 x float> undef, undef
; CHECK-Z14: Cost Model: Found an estimated cost of 1 for instruction: %res3 = fadd <2 x float> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res4 = fadd <2 x double> undef, undef
; CHECK-Z13: Cost Model: Found an estimated cost of 8 for instruction: %res5 = fadd <4 x float> undef, undef
; CHECK-Z14: Cost Model: Found an estimated cost of 1 for instruction: %res5 = fadd <4 x float> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res6 = fadd <4 x double> undef, undef
; CHECK-Z13: Cost Model: Found an estimated cost of 16 for instruction: %res7 = fadd <8 x float> undef, undef
; CHECK-Z14: Cost Model: Found an estimated cost of 2 for instruction: %res7 = fadd <8 x float> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res8 = fadd <8 x double> undef, undef
; CHECK-Z13: Cost Model: Found an estimated cost of 32 for instruction: %res9 = fadd <16 x float> undef, undef
; CHECK-Z14: Cost Model: Found an estimated cost of 4 for instruction: %res9 = fadd <16 x float> undef, undef
; CHECK: Cost Model: Found an estimated cost of 8 for instruction: %res10 = fadd <16 x double> undef, undef
ret void;
}
define void @fsub() {
%res0 = fsub float undef, undef
%res1 = fsub double undef, undef
%res2 = fsub fp128 undef, undef
%res3 = fsub <2 x float> undef, undef
%res4 = fsub <2 x double> undef, undef
%res5 = fsub <4 x float> undef, undef
%res6 = fsub <4 x double> undef, undef
%res7 = fsub <8 x float> undef, undef
%res8 = fsub <8 x double> undef, undef
%res9 = fsub <16 x float> undef, undef
%res10 = fsub <16 x double> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res0 = fsub float undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res1 = fsub double undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res2 = fsub fp128 undef, undef
; CHECK-Z13: Cost Model: Found an estimated cost of 8 for instruction: %res3 = fsub <2 x float> undef, undef
; CHECK-Z14: Cost Model: Found an estimated cost of 1 for instruction: %res3 = fsub <2 x float> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res4 = fsub <2 x double> undef, undef
; CHECK-Z13: Cost Model: Found an estimated cost of 8 for instruction: %res5 = fsub <4 x float> undef, undef
; CHECK-Z14: Cost Model: Found an estimated cost of 1 for instruction: %res5 = fsub <4 x float> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res6 = fsub <4 x double> undef, undef
; CHECK-Z13: Cost Model: Found an estimated cost of 16 for instruction: %res7 = fsub <8 x float> undef, undef
; CHECK-Z14: Cost Model: Found an estimated cost of 2 for instruction: %res7 = fsub <8 x float> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res8 = fsub <8 x double> undef, undef
; CHECK-Z13: Cost Model: Found an estimated cost of 32 for instruction: %res9 = fsub <16 x float> undef, undef
; CHECK-Z14: Cost Model: Found an estimated cost of 4 for instruction: %res9 = fsub <16 x float> undef, undef
; CHECK: Cost Model: Found an estimated cost of 8 for instruction: %res10 = fsub <16 x double> undef, undef
ret void;
}
define void @fmul() {
%res0 = fmul float undef, undef
%res1 = fmul double undef, undef
%res2 = fmul fp128 undef, undef
%res3 = fmul <2 x float> undef, undef
%res4 = fmul <2 x double> undef, undef
%res5 = fmul <4 x float> undef, undef
%res6 = fmul <4 x double> undef, undef
%res7 = fmul <8 x float> undef, undef
%res8 = fmul <8 x double> undef, undef
%res9 = fmul <16 x float> undef, undef
%res10 = fmul <16 x double> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res0 = fmul float undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res1 = fmul double undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res2 = fmul fp128 undef, undef
; CHECK-Z13: Cost Model: Found an estimated cost of 8 for instruction: %res3 = fmul <2 x float> undef, undef
; CHECK-Z14: Cost Model: Found an estimated cost of 1 for instruction: %res3 = fmul <2 x float> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res4 = fmul <2 x double> undef, undef
; CHECK-Z13: Cost Model: Found an estimated cost of 8 for instruction: %res5 = fmul <4 x float> undef, undef
; CHECK-Z14: Cost Model: Found an estimated cost of 1 for instruction: %res5 = fmul <4 x float> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res6 = fmul <4 x double> undef, undef
; CHECK-Z13: Cost Model: Found an estimated cost of 16 for instruction: %res7 = fmul <8 x float> undef, undef
; CHECK-Z14: Cost Model: Found an estimated cost of 2 for instruction: %res7 = fmul <8 x float> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res8 = fmul <8 x double> undef, undef
; CHECK-Z13: Cost Model: Found an estimated cost of 32 for instruction: %res9 = fmul <16 x float> undef, undef
; CHECK-Z14: Cost Model: Found an estimated cost of 4 for instruction: %res9 = fmul <16 x float> undef, undef
; CHECK: Cost Model: Found an estimated cost of 8 for instruction: %res10 = fmul <16 x double> undef, undef
ret void;
}
define void @fdiv() {
%res0 = fdiv float undef, undef
%res1 = fdiv double undef, undef
%res2 = fdiv fp128 undef, undef
%res3 = fdiv <2 x float> undef, undef
%res4 = fdiv <2 x double> undef, undef
%res5 = fdiv <4 x float> undef, undef
%res6 = fdiv <4 x double> undef, undef
%res7 = fdiv <8 x float> undef, undef
%res8 = fdiv <8 x double> undef, undef
%res9 = fdiv <16 x float> undef, undef
%res10 = fdiv <16 x double> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res0 = fdiv float undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res1 = fdiv double undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res2 = fdiv fp128 undef, undef
; CHECK-Z13: Cost Model: Found an estimated cost of 8 for instruction: %res3 = fdiv <2 x float> undef, undef
; CHECK-Z14: Cost Model: Found an estimated cost of 1 for instruction: %res3 = fdiv <2 x float> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res4 = fdiv <2 x double> undef, undef
; CHECK-Z13: Cost Model: Found an estimated cost of 8 for instruction: %res5 = fdiv <4 x float> undef, undef
; CHECK-Z14: Cost Model: Found an estimated cost of 1 for instruction: %res5 = fdiv <4 x float> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res6 = fdiv <4 x double> undef, undef
; CHECK-Z13: Cost Model: Found an estimated cost of 16 for instruction: %res7 = fdiv <8 x float> undef, undef
; CHECK-Z14: Cost Model: Found an estimated cost of 2 for instruction: %res7 = fdiv <8 x float> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res8 = fdiv <8 x double> undef, undef
; CHECK-Z13: Cost Model: Found an estimated cost of 32 for instruction: %res9 = fdiv <16 x float> undef, undef
; CHECK-Z14: Cost Model: Found an estimated cost of 4 for instruction: %res9 = fdiv <16 x float> undef, undef
; CHECK: Cost Model: Found an estimated cost of 8 for instruction: %res10 = fdiv <16 x double> undef, undef
ret void;
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,326 +0,0 @@
; RUN: opt < %s -cost-model -analyze -mtriple=systemz-unknown -mcpu=z13 | FileCheck %s
;
; Note: The scalarized vector instructions costs are not including any
; extracts, due to the undef operands.
define void @add() {
%res0 = add i8 undef, undef
%res1 = add i16 undef, undef
%res2 = add i32 undef, undef
%res3 = add i64 undef, undef
%res4 = add <2 x i8> undef, undef
%res5 = add <2 x i16> undef, undef
%res6 = add <2 x i32> undef, undef
%res7 = add <2 x i64> undef, undef
%res8 = add <4 x i8> undef, undef
%res9 = add <4 x i16> undef, undef
%res10 = add <4 x i32> undef, undef
%res11 = add <4 x i64> undef, undef
%res12 = add <8 x i8> undef, undef
%res13 = add <8 x i16> undef, undef
%res14 = add <8 x i32> undef, undef
%res15 = add <8 x i64> undef, undef
%res16 = add <16 x i8> undef, undef
%res17 = add <16 x i16> undef, undef
%res18 = add <16 x i32> undef, undef
%res19 = add <16 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res0 = add i8 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res1 = add i16 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res2 = add i32 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res3 = add i64 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res4 = add <2 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res5 = add <2 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res6 = add <2 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res7 = add <2 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res8 = add <4 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res9 = add <4 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res10 = add <4 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res11 = add <4 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res12 = add <8 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res13 = add <8 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res14 = add <8 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res15 = add <8 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res16 = add <16 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res17 = add <16 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res18 = add <16 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 8 for instruction: %res19 = add <16 x i64> undef, undef
ret void;
}
define void @sub() {
%res0 = sub i8 undef, undef
%res1 = sub i16 undef, undef
%res2 = sub i32 undef, undef
%res3 = sub i64 undef, undef
%res4 = sub <2 x i8> undef, undef
%res5 = sub <2 x i16> undef, undef
%res6 = sub <2 x i32> undef, undef
%res7 = sub <2 x i64> undef, undef
%res8 = sub <4 x i8> undef, undef
%res9 = sub <4 x i16> undef, undef
%res10 = sub <4 x i32> undef, undef
%res11 = sub <4 x i64> undef, undef
%res12 = sub <8 x i8> undef, undef
%res13 = sub <8 x i16> undef, undef
%res14 = sub <8 x i32> undef, undef
%res15 = sub <8 x i64> undef, undef
%res16 = sub <16 x i8> undef, undef
%res17 = sub <16 x i16> undef, undef
%res18 = sub <16 x i32> undef, undef
%res19 = sub <16 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res0 = sub i8 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res1 = sub i16 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res2 = sub i32 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res3 = sub i64 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res4 = sub <2 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res5 = sub <2 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res6 = sub <2 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res7 = sub <2 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res8 = sub <4 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res9 = sub <4 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res10 = sub <4 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res11 = sub <4 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res12 = sub <8 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res13 = sub <8 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res14 = sub <8 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res15 = sub <8 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res16 = sub <16 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res17 = sub <16 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res18 = sub <16 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 8 for instruction: %res19 = sub <16 x i64> undef, undef
ret void;
}
define void @mul() {
%res0 = mul i8 undef, undef
%res1 = mul i16 undef, undef
%res2 = mul i32 undef, undef
%res3 = mul i64 undef, undef
%res4 = mul <2 x i8> undef, undef
%res5 = mul <2 x i16> undef, undef
%res6 = mul <2 x i32> undef, undef
%res7 = mul <2 x i64> undef, undef
%res8 = mul <4 x i8> undef, undef
%res9 = mul <4 x i16> undef, undef
%res10 = mul <4 x i32> undef, undef
%res11 = mul <4 x i64> undef, undef
%res12 = mul <8 x i8> undef, undef
%res13 = mul <8 x i16> undef, undef
%res14 = mul <8 x i32> undef, undef
%res15 = mul <8 x i64> undef, undef
%res16 = mul <16 x i8> undef, undef
%res17 = mul <16 x i16> undef, undef
%res18 = mul <16 x i32> undef, undef
%res19 = mul <16 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res0 = mul i8 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res1 = mul i16 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res2 = mul i32 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res3 = mul i64 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res4 = mul <2 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res5 = mul <2 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res6 = mul <2 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %res7 = mul <2 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res8 = mul <4 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res9 = mul <4 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res10 = mul <4 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 6 for instruction: %res11 = mul <4 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res12 = mul <8 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res13 = mul <8 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res14 = mul <8 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 12 for instruction: %res15 = mul <8 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res16 = mul <16 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res17 = mul <16 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res18 = mul <16 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 24 for instruction: %res19 = mul <16 x i64> undef, undef
ret void;
}
define void @sdiv() {
%res0 = sdiv i8 undef, undef
%res1 = sdiv i16 undef, undef
%res2 = sdiv i32 undef, undef
%res3 = sdiv i64 undef, undef
%res4 = sdiv <2 x i8> undef, undef
%res5 = sdiv <2 x i16> undef, undef
%res6 = sdiv <2 x i32> undef, undef
%res7 = sdiv <2 x i64> undef, undef
%res8 = sdiv <4 x i8> undef, undef
%res9 = sdiv <4 x i16> undef, undef
%res10 = sdiv <4 x i32> undef, undef
%res11 = sdiv <4 x i64> undef, undef
%res12 = sdiv <8 x i8> undef, undef
%res13 = sdiv <8 x i16> undef, undef
%res14 = sdiv <8 x i32> undef, undef
%res15 = sdiv <8 x i64> undef, undef
%res16 = sdiv <16 x i8> undef, undef
%res17 = sdiv <16 x i16> undef, undef
%res18 = sdiv <16 x i32> undef, undef
%res19 = sdiv <16 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res0 = sdiv i8 undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res1 = sdiv i16 undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res2 = sdiv i32 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res3 = sdiv i64 undef, undef
; CHECK: Cost Model: Found an estimated cost of 10 for instruction: %res4 = sdiv <2 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 10 for instruction: %res5 = sdiv <2 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 6 for instruction: %res6 = sdiv <2 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %res7 = sdiv <2 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 20 for instruction: %res8 = sdiv <4 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 20 for instruction: %res9 = sdiv <4 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 12 for instruction: %res10 = sdiv <4 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 6 for instruction: %res11 = sdiv <4 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 40 for instruction: %res12 = sdiv <8 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 40 for instruction: %res13 = sdiv <8 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 24 for instruction: %res14 = sdiv <8 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 12 for instruction: %res15 = sdiv <8 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 80 for instruction: %res16 = sdiv <16 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 80 for instruction: %res17 = sdiv <16 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 48 for instruction: %res18 = sdiv <16 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 24 for instruction: %res19 = sdiv <16 x i64> undef, undef
ret void;
}
define void @srem() {
%res0 = srem i8 undef, undef
%res1 = srem i16 undef, undef
%res2 = srem i32 undef, undef
%res3 = srem i64 undef, undef
%res4 = srem <2 x i8> undef, undef
%res5 = srem <2 x i16> undef, undef
%res6 = srem <2 x i32> undef, undef
%res7 = srem <2 x i64> undef, undef
%res8 = srem <4 x i8> undef, undef
%res9 = srem <4 x i16> undef, undef
%res10 = srem <4 x i32> undef, undef
%res11 = srem <4 x i64> undef, undef
%res12 = srem <8 x i8> undef, undef
%res13 = srem <8 x i16> undef, undef
%res14 = srem <8 x i32> undef, undef
%res15 = srem <8 x i64> undef, undef
%res16 = srem <16 x i8> undef, undef
%res17 = srem <16 x i16> undef, undef
%res18 = srem <16 x i32> undef, undef
%res19 = srem <16 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res0 = srem i8 undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res1 = srem i16 undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res2 = srem i32 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res3 = srem i64 undef, undef
; CHECK: Cost Model: Found an estimated cost of 10 for instruction: %res4 = srem <2 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 10 for instruction: %res5 = srem <2 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 6 for instruction: %res6 = srem <2 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %res7 = srem <2 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 20 for instruction: %res8 = srem <4 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 20 for instruction: %res9 = srem <4 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 12 for instruction: %res10 = srem <4 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 6 for instruction: %res11 = srem <4 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 40 for instruction: %res12 = srem <8 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 40 for instruction: %res13 = srem <8 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 24 for instruction: %res14 = srem <8 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 12 for instruction: %res15 = srem <8 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 80 for instruction: %res16 = srem <16 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 80 for instruction: %res17 = srem <16 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 48 for instruction: %res18 = srem <16 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 24 for instruction: %res19 = srem <16 x i64> undef, undef
ret void;
}
define void @udiv() {
%res0 = udiv i8 undef, undef
%res1 = udiv i16 undef, undef
%res2 = udiv i32 undef, undef
%res3 = udiv i64 undef, undef
%res4 = udiv <2 x i8> undef, undef
%res5 = udiv <2 x i16> undef, undef
%res6 = udiv <2 x i32> undef, undef
%res7 = udiv <2 x i64> undef, undef
%res8 = udiv <4 x i8> undef, undef
%res9 = udiv <4 x i16> undef, undef
%res10 = udiv <4 x i32> undef, undef
%res11 = udiv <4 x i64> undef, undef
%res12 = udiv <8 x i8> undef, undef
%res13 = udiv <8 x i16> undef, undef
%res14 = udiv <8 x i32> undef, undef
%res15 = udiv <8 x i64> undef, undef
%res16 = udiv <16 x i8> undef, undef
%res17 = udiv <16 x i16> undef, undef
%res18 = udiv <16 x i32> undef, undef
%res19 = udiv <16 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res0 = udiv i8 undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res1 = udiv i16 undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res2 = udiv i32 undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res3 = udiv i64 undef, undef
; CHECK: Cost Model: Found an estimated cost of 10 for instruction: %res4 = udiv <2 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 10 for instruction: %res5 = udiv <2 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 6 for instruction: %res6 = udiv <2 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 5 for instruction: %res7 = udiv <2 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 20 for instruction: %res8 = udiv <4 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 20 for instruction: %res9 = udiv <4 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 12 for instruction: %res10 = udiv <4 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 10 for instruction: %res11 = udiv <4 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 40 for instruction: %res12 = udiv <8 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 40 for instruction: %res13 = udiv <8 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 24 for instruction: %res14 = udiv <8 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 20 for instruction: %res15 = udiv <8 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 80 for instruction: %res16 = udiv <16 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 80 for instruction: %res17 = udiv <16 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 48 for instruction: %res18 = udiv <16 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 40 for instruction: %res19 = udiv <16 x i64> undef, undef
ret void;
}
define void @urem() {
%res0 = urem i8 undef, undef
%res1 = urem i16 undef, undef
%res2 = urem i32 undef, undef
%res3 = urem i64 undef, undef
%res4 = urem <2 x i8> undef, undef
%res5 = urem <2 x i16> undef, undef
%res6 = urem <2 x i32> undef, undef
%res7 = urem <2 x i64> undef, undef
%res8 = urem <4 x i8> undef, undef
%res9 = urem <4 x i16> undef, undef
%res10 = urem <4 x i32> undef, undef
%res11 = urem <4 x i64> undef, undef
%res12 = urem <8 x i8> undef, undef
%res13 = urem <8 x i16> undef, undef
%res14 = urem <8 x i32> undef, undef
%res15 = urem <8 x i64> undef, undef
%res16 = urem <16 x i8> undef, undef
%res17 = urem <16 x i16> undef, undef
%res18 = urem <16 x i32> undef, undef
%res19 = urem <16 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res0 = urem i8 undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res1 = urem i16 undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res2 = urem i32 undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res3 = urem i64 undef, undef
; CHECK: Cost Model: Found an estimated cost of 10 for instruction: %res4 = urem <2 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 10 for instruction: %res5 = urem <2 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 6 for instruction: %res6 = urem <2 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 5 for instruction: %res7 = urem <2 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 20 for instruction: %res8 = urem <4 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 20 for instruction: %res9 = urem <4 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 12 for instruction: %res10 = urem <4 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 10 for instruction: %res11 = urem <4 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 40 for instruction: %res12 = urem <8 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 40 for instruction: %res13 = urem <8 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 24 for instruction: %res14 = urem <8 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 20 for instruction: %res15 = urem <8 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 80 for instruction: %res16 = urem <16 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 80 for instruction: %res17 = urem <16 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 48 for instruction: %res18 = urem <16 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 40 for instruction: %res19 = urem <16 x i64> undef, undef
ret void;
}

View File

@@ -1,199 +0,0 @@
; RUN: opt < %s -cost-model -analyze -mtriple=systemz-unknown -mcpu=z13 | FileCheck %s
define void @sext() {
%v0 = sext i8 undef to i16
%v1 = sext i8 undef to i32
%v2 = sext i8 undef to i64
%v3 = sext i16 undef to i32
%v4 = sext i16 undef to i64
%v5 = sext i32 undef to i64
%v6 = sext <2 x i8> undef to <2 x i16>
%v7 = sext <2 x i8> undef to <2 x i32>
%v8 = sext <2 x i8> undef to <2 x i64>
%v9 = sext <2 x i16> undef to <2 x i32>
%v10 = sext <2 x i16> undef to <2 x i64>
%v11 = sext <2 x i32> undef to <2 x i64>
%v12 = sext <4 x i8> undef to <4 x i16>
%v13 = sext <4 x i8> undef to <4 x i32>
%v14 = sext <4 x i8> undef to <4 x i64>
%v15 = sext <4 x i16> undef to <4 x i32>
%v16 = sext <4 x i16> undef to <4 x i64>
%v17 = sext <4 x i32> undef to <4 x i64>
%v18 = sext <8 x i8> undef to <8 x i16>
%v19 = sext <8 x i8> undef to <8 x i32>
%v20 = sext <8 x i8> undef to <8 x i64>
%v21 = sext <8 x i16> undef to <8 x i32>
%v22 = sext <8 x i16> undef to <8 x i64>
%v23 = sext <8 x i32> undef to <8 x i64>
%v24 = sext <16 x i8> undef to <16 x i16>
%v25 = sext <16 x i8> undef to <16 x i32>
%v26 = sext <16 x i8> undef to <16 x i64>
%v27 = sext <16 x i16> undef to <16 x i32>
%v28 = sext <16 x i16> undef to <16 x i64>
%v29 = sext <16 x i32> undef to <16 x i64>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v0 = sext i8 undef to i16
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v1 = sext i8 undef to i32
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v2 = sext i8 undef to i64
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v3 = sext i16 undef to i32
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v4 = sext i16 undef to i64
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v5 = sext i32 undef to i64
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v6 = sext <2 x i8> undef to <2 x i16>
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %v7 = sext <2 x i8> undef to <2 x i32>
; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %v8 = sext <2 x i8> undef to <2 x i64>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v9 = sext <2 x i16> undef to <2 x i32>
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %v10 = sext <2 x i16> undef to <2 x i64>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v11 = sext <2 x i32> undef to <2 x i64>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v12 = sext <4 x i8> undef to <4 x i16>
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %v13 = sext <4 x i8> undef to <4 x i32>
; CHECK: Cost Model: Found an estimated cost of 7 for instruction: %v14 = sext <4 x i8> undef to <4 x i64>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v15 = sext <4 x i16> undef to <4 x i32>
; CHECK: Cost Model: Found an estimated cost of 5 for instruction: %v16 = sext <4 x i16> undef to <4 x i64>
; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %v17 = sext <4 x i32> undef to <4 x i64>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v18 = sext <8 x i8> undef to <8 x i16>
; CHECK: Cost Model: Found an estimated cost of 5 for instruction: %v19 = sext <8 x i8> undef to <8 x i32>
; CHECK: Cost Model: Found an estimated cost of 15 for instruction: %v20 = sext <8 x i8> undef to <8 x i64>
; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %v21 = sext <8 x i16> undef to <8 x i32>
; CHECK: Cost Model: Found an estimated cost of 11 for instruction: %v22 = sext <8 x i16> undef to <8 x i64>
; CHECK: Cost Model: Found an estimated cost of 6 for instruction: %v23 = sext <8 x i32> undef to <8 x i64>
; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %v24 = sext <16 x i8> undef to <16 x i16>
; CHECK: Cost Model: Found an estimated cost of 11 for instruction: %v25 = sext <16 x i8> undef to <16 x i32>
; CHECK: Cost Model: Found an estimated cost of 31 for instruction: %v26 = sext <16 x i8> undef to <16 x i64>
; CHECK: Cost Model: Found an estimated cost of 6 for instruction: %v27 = sext <16 x i16> undef to <16 x i32>
; CHECK: Cost Model: Found an estimated cost of 22 for instruction: %v28 = sext <16 x i16> undef to <16 x i64>
; CHECK: Cost Model: Found an estimated cost of 12 for instruction: %v29 = sext <16 x i32> undef to <16 x i64>
ret void
}
define void @zext() {
%v0 = zext i8 undef to i16
%v1 = zext i8 undef to i32
%v2 = zext i8 undef to i64
%v3 = zext i16 undef to i32
%v4 = zext i16 undef to i64
%v5 = zext i32 undef to i64
%v6 = zext <2 x i8> undef to <2 x i16>
%v7 = zext <2 x i8> undef to <2 x i32>
%v8 = zext <2 x i8> undef to <2 x i64>
%v9 = zext <2 x i16> undef to <2 x i32>
%v10 = zext <2 x i16> undef to <2 x i64>
%v11 = zext <2 x i32> undef to <2 x i64>
%v12 = zext <4 x i8> undef to <4 x i16>
%v13 = zext <4 x i8> undef to <4 x i32>
%v14 = zext <4 x i8> undef to <4 x i64>
%v15 = zext <4 x i16> undef to <4 x i32>
%v16 = zext <4 x i16> undef to <4 x i64>
%v17 = zext <4 x i32> undef to <4 x i64>
%v18 = zext <8 x i8> undef to <8 x i16>
%v19 = zext <8 x i8> undef to <8 x i32>
%v20 = zext <8 x i8> undef to <8 x i64>
%v21 = zext <8 x i16> undef to <8 x i32>
%v22 = zext <8 x i16> undef to <8 x i64>
%v23 = zext <8 x i32> undef to <8 x i64>
%v24 = zext <16 x i8> undef to <16 x i16>
%v25 = zext <16 x i8> undef to <16 x i32>
%v26 = zext <16 x i8> undef to <16 x i64>
%v27 = zext <16 x i16> undef to <16 x i32>
%v28 = zext <16 x i16> undef to <16 x i64>
%v29 = zext <16 x i32> undef to <16 x i64>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v0 = zext i8 undef to i16
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v1 = zext i8 undef to i32
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v2 = zext i8 undef to i64
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v3 = zext i16 undef to i32
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v4 = zext i16 undef to i64
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v5 = zext i32 undef to i64
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v6 = zext <2 x i8> undef to <2 x i16>
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %v7 = zext <2 x i8> undef to <2 x i32>
; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %v8 = zext <2 x i8> undef to <2 x i64>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v9 = zext <2 x i16> undef to <2 x i32>
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %v10 = zext <2 x i16> undef to <2 x i64>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v11 = zext <2 x i32> undef to <2 x i64>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v12 = zext <4 x i8> undef to <4 x i16>
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %v13 = zext <4 x i8> undef to <4 x i32>
; CHECK: Cost Model: Found an estimated cost of 7 for instruction: %v14 = zext <4 x i8> undef to <4 x i64>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v15 = zext <4 x i16> undef to <4 x i32>
; CHECK: Cost Model: Found an estimated cost of 5 for instruction: %v16 = zext <4 x i16> undef to <4 x i64>
; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %v17 = zext <4 x i32> undef to <4 x i64>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v18 = zext <8 x i8> undef to <8 x i16>
; CHECK: Cost Model: Found an estimated cost of 5 for instruction: %v19 = zext <8 x i8> undef to <8 x i32>
; CHECK: Cost Model: Found an estimated cost of 15 for instruction: %v20 = zext <8 x i8> undef to <8 x i64>
; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %v21 = zext <8 x i16> undef to <8 x i32>
; CHECK: Cost Model: Found an estimated cost of 11 for instruction: %v22 = zext <8 x i16> undef to <8 x i64>
; CHECK: Cost Model: Found an estimated cost of 6 for instruction: %v23 = zext <8 x i32> undef to <8 x i64>
; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %v24 = zext <16 x i8> undef to <16 x i16>
; CHECK: Cost Model: Found an estimated cost of 11 for instruction: %v25 = zext <16 x i8> undef to <16 x i32>
; CHECK: Cost Model: Found an estimated cost of 31 for instruction: %v26 = zext <16 x i8> undef to <16 x i64>
; CHECK: Cost Model: Found an estimated cost of 6 for instruction: %v27 = zext <16 x i16> undef to <16 x i32>
; CHECK: Cost Model: Found an estimated cost of 22 for instruction: %v28 = zext <16 x i16> undef to <16 x i64>
; CHECK: Cost Model: Found an estimated cost of 12 for instruction: %v29 = zext <16 x i32> undef to <16 x i64>
ret void
}
define void @trunc() {
%v0 = trunc i16 undef to i8
%v1 = trunc i32 undef to i16
%v2 = trunc i32 undef to i8
%v3 = trunc i64 undef to i32
%v4 = trunc i64 undef to i16
%v5 = trunc i64 undef to i8
%v6 = trunc <2 x i16> undef to <2 x i8>
%v7 = trunc <2 x i32> undef to <2 x i16>
%v8 = trunc <2 x i32> undef to <2 x i8>
%v9 = trunc <2 x i64> undef to <2 x i32>
%v10 = trunc <2 x i64> undef to <2 x i16>
%v11 = trunc <2 x i64> undef to <2 x i8>
%v12 = trunc <4 x i16> undef to <4 x i8>
%v13 = trunc <4 x i32> undef to <4 x i16>
%v14 = trunc <4 x i32> undef to <4 x i8>
%v15 = trunc <4 x i64> undef to <4 x i32>
%v16 = trunc <4 x i64> undef to <4 x i16>
%v17 = trunc <4 x i64> undef to <4 x i8>
%v18 = trunc <8 x i16> undef to <8 x i8>
%v19 = trunc <8 x i32> undef to <8 x i16>
%v20 = trunc <8 x i32> undef to <8 x i8>
%v21 = trunc <8 x i64> undef to <8 x i32>
%v22 = trunc <8 x i64> undef to <8 x i16>
%v23 = trunc <8 x i64> undef to <8 x i8>
%v24 = trunc <16 x i16> undef to <16 x i8>
%v25 = trunc <16 x i32> undef to <16 x i16>
%v26 = trunc <16 x i32> undef to <16 x i8>
%v27 = trunc <16 x i64> undef to <16 x i32>
%v28 = trunc <16 x i64> undef to <16 x i16>
%v29 = trunc <16 x i64> undef to <16 x i8>
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %v0 = trunc i16 undef to i8
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %v1 = trunc i32 undef to i16
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %v2 = trunc i32 undef to i8
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %v3 = trunc i64 undef to i32
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %v4 = trunc i64 undef to i16
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %v5 = trunc i64 undef to i8
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v6 = trunc <2 x i16> undef to <2 x i8>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v7 = trunc <2 x i32> undef to <2 x i16>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v8 = trunc <2 x i32> undef to <2 x i8>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v9 = trunc <2 x i64> undef to <2 x i32>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v10 = trunc <2 x i64> undef to <2 x i16>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v11 = trunc <2 x i64> undef to <2 x i8>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v12 = trunc <4 x i16> undef to <4 x i8>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v13 = trunc <4 x i32> undef to <4 x i16>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v14 = trunc <4 x i32> undef to <4 x i8>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v15 = trunc <4 x i64> undef to <4 x i32>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v16 = trunc <4 x i64> undef to <4 x i16>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v17 = trunc <4 x i64> undef to <4 x i8>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v18 = trunc <8 x i16> undef to <8 x i8>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v19 = trunc <8 x i32> undef to <8 x i16>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v20 = trunc <8 x i32> undef to <8 x i8>
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %v21 = trunc <8 x i64> undef to <8 x i32>
; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %v22 = trunc <8 x i64> undef to <8 x i16>
; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %v23 = trunc <8 x i64> undef to <8 x i8>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %v24 = trunc <16 x i16> undef to <16 x i8>
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %v25 = trunc <16 x i32> undef to <16 x i16>
; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %v26 = trunc <16 x i32> undef to <16 x i8>
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %v27 = trunc <16 x i64> undef to <16 x i32>
; CHECK: Cost Model: Found an estimated cost of 6 for instruction: %v28 = trunc <16 x i64> undef to <16 x i16>
; CHECK: Cost Model: Found an estimated cost of 7 for instruction: %v29 = trunc <16 x i64> undef to <16 x i8>
ret void
}

View File

@@ -1,66 +0,0 @@
; RUN: opt < %s -O3 -S -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
;
; Regression test for a crash in getIntrinsicInstrCost().
; Don't call getScalarizationOverhead(RetTy, true, false) if RetTy is void type.
%"class.llvm::SDNode.310.1762.9990.10474.10958.11442.11926.12410.12894.13378.13862.15314.15798.16282.17734.19186.21122.25962.26930.29350.29834.30318.30802.31286.31770.32254.32738.33706.36610.38062.41642" = type <{ %"class.llvm::FoldingSetImpl::Node.298.1750.9978.10462.10946.11430.11914.12398.12882.13366.13850.15302.15786.16270.17722.19174.21110.25950.26918.29338.29822.30306.30790.31274.31758.32242.32726.33694.36598.38050.41625", %"class.llvm::ilist_node.228.300.1752.9980.10464.10948.11432.11916.12400.12884.13368.13852.15304.15788.16272.17724.19176.21112.25952.26920.29340.29824.30308.30792.31276.31760.32244.32728.33696.36600.38052.41628", i16, %union.anon.230.302.1754.9982.10466.10950.11434.11918.12402.12886.13370.13854.15306.15790.16274.17726.19178.21114.25954.26922.29342.29826.30310.30794.31278.31762.32246.32730.33698.36602.38054.41630, i32, %"class.llvm::SDUse.304.1756.9984.10468.10952.11436.11920.12404.12888.13372.13856.15308.15792.16276.17728.19180.21116.25956.26924.29344.29828.30312.30796.31280.31764.32248.32732.33700.36604.38056.41632"*, %"struct.llvm::EVT.305.1757.9985.10469.10953.11437.11921.12405.12889.13373.13857.15309.15793.16277.17729.19181.21117.25957.26925.29345.29829.30313.30797.31281.31765.32249.32733.33701.36605.38057.41637"*, %"class.llvm::SDUse.304.1756.9984.10468.10952.11436.11920.12404.12888.13372.13856.15308.15792.16276.17728.19180.21116.25956.26924.29344.29828.30312.30796.31280.31764.32248.32732.33700.36604.38056.41632"*, i16, i16, i32, %"class.llvm::DebugLoc.309.1761.9989.10473.10957.11441.11925.12409.12893.13377.13861.15313.15797.16281.17733.19185.21121.25961.26929.29349.29833.30317.30801.31285.31769.32253.32737.33705.36609.38061.41641", i16, [6 x i8] }>
%"class.llvm::FoldingSetImpl::Node.298.1750.9978.10462.10946.11430.11914.12398.12882.13366.13850.15302.15786.16270.17722.19174.21110.25950.26918.29338.29822.30306.30790.31274.31758.32242.32726.33694.36598.38050.41625" = type { i8* }
%"class.llvm::ilist_node.228.300.1752.9980.10464.10948.11432.11916.12400.12884.13368.13852.15304.15788.16272.17724.19176.21112.25952.26920.29340.29824.30308.30792.31276.31760.32244.32728.33696.36600.38052.41628" = type { %"class.llvm::ilist_node_impl.229.299.1751.9979.10463.10947.11431.11915.12399.12883.13367.13851.15303.15787.16271.17723.19175.21111.25951.26919.29339.29823.30307.30791.31275.31759.32243.32727.33695.36599.38051.41627" }
%"class.llvm::ilist_node_impl.229.299.1751.9979.10463.10947.11431.11915.12399.12883.13367.13851.15303.15787.16271.17723.19175.21111.25951.26919.29339.29823.30307.30791.31275.31759.32243.32727.33695.36599.38051.41627" = type { %"class.llvm::ilist_node_base.83.1535.9763.10247.10731.11215.11699.12183.12667.13151.13635.15087.15571.16055.17507.18959.20895.25735.26703.29123.29607.30091.30575.31059.31543.32027.32511.33479.36383.37835.41626" }
%"class.llvm::ilist_node_base.83.1535.9763.10247.10731.11215.11699.12183.12667.13151.13635.15087.15571.16055.17507.18959.20895.25735.26703.29123.29607.30091.30575.31059.31543.32027.32511.33479.36383.37835.41626" = type { %"class.llvm::ilist_node_base.83.1535.9763.10247.10731.11215.11699.12183.12667.13151.13635.15087.15571.16055.17507.18959.20895.25735.26703.29123.29607.30091.30575.31059.31543.32027.32511.33479.36383.37835.41626"*, %"class.llvm::ilist_node_base.83.1535.9763.10247.10731.11215.11699.12183.12667.13151.13635.15087.15571.16055.17507.18959.20895.25735.26703.29123.29607.30091.30575.31059.31543.32027.32511.33479.36383.37835.41626"* }
%union.anon.230.302.1754.9982.10466.10950.11434.11918.12402.12886.13370.13854.15306.15790.16274.17726.19178.21114.25954.26922.29342.29826.30310.30794.31278.31762.32246.32730.33698.36602.38054.41630 = type { %"class.llvm::SDNode::LSBaseSDNodeBitfields.301.1753.9981.10465.10949.11433.11917.12401.12885.13369.13853.15305.15789.16273.17725.19177.21113.25953.26921.29341.29825.30309.30793.31277.31761.32245.32729.33697.36601.38053.41629" }
%"class.llvm::SDNode::LSBaseSDNodeBitfields.301.1753.9981.10465.10949.11433.11917.12401.12885.13369.13853.15305.15789.16273.17725.19177.21113.25953.26921.29341.29825.30309.30793.31277.31761.32245.32729.33697.36601.38053.41629" = type { i16 }
%"struct.llvm::EVT.305.1757.9985.10469.10953.11437.11921.12405.12889.13373.13857.15309.15793.16277.17729.19181.21117.25957.26925.29345.29829.30313.30797.31281.31765.32249.32733.33701.36605.38057.41637" = type { %"class.llvm::MVT.62.1514.9742.10226.10710.11194.11678.12162.12646.13130.13614.15066.15550.16034.17486.18938.20874.25714.26682.29102.29586.30070.30554.31038.31522.32006.32490.33458.36362.37814.41633", %"class.llvm::Type.77.1529.9757.10241.10725.11209.11693.12177.12661.13145.13629.15081.15565.16049.17501.18953.20889.25729.26697.29117.29601.30085.30569.31053.31537.32021.32505.33473.36377.37829.41636"* }
%"class.llvm::MVT.62.1514.9742.10226.10710.11194.11678.12162.12646.13130.13614.15066.15550.16034.17486.18938.20874.25714.26682.29102.29586.30070.30554.31038.31522.32006.32490.33458.36362.37814.41633" = type { i8 }
%"class.llvm::Type.77.1529.9757.10241.10725.11209.11693.12177.12661.13145.13629.15081.15565.16049.17501.18953.20889.25729.26697.29117.29601.30085.30569.31053.31537.32021.32505.33473.36377.37829.41636" = type { %"class.llvm::LLVMContext.76.1528.9756.10240.10724.11208.11692.12176.12660.13144.13628.15080.15564.16048.17500.18952.20888.25728.26696.29116.29600.30084.30568.31052.31536.32020.32504.33472.36376.37828.41635"*, i32, i32, %"class.llvm::Type.77.1529.9757.10241.10725.11209.11693.12177.12661.13145.13629.15081.15565.16049.17501.18953.20889.25729.26697.29117.29601.30085.30569.31053.31537.32021.32505.33473.36377.37829.41636"** }
%"class.llvm::LLVMContext.76.1528.9756.10240.10724.11208.11692.12176.12660.13144.13628.15080.15564.16048.17500.18952.20888.25728.26696.29116.29600.30084.30568.31052.31536.32020.32504.33472.36376.37828.41635" = type { %"class.llvm::LLVMContextImpl.75.1527.9755.10239.10723.11207.11691.12175.12659.13143.13627.15079.15563.16047.17499.18951.20887.25727.26695.29115.29599.30083.30567.31051.31535.32019.32503.33471.36375.37827.41634"* }
%"class.llvm::LLVMContextImpl.75.1527.9755.10239.10723.11207.11691.12175.12659.13143.13627.15079.15563.16047.17499.18951.20887.25727.26695.29115.29599.30083.30567.31051.31535.32019.32503.33471.36375.37827.41634" = type opaque
%"class.llvm::SDUse.304.1756.9984.10468.10952.11436.11920.12404.12888.13372.13856.15308.15792.16276.17728.19180.21116.25956.26924.29344.29828.30312.30796.31280.31764.32248.32732.33700.36604.38056.41632" = type { %"class.llvm::SDValue.303.1755.9983.10467.10951.11435.11919.12403.12887.13371.13855.15307.15791.16275.17727.19179.21115.25955.26923.29343.29827.30311.30795.31279.31763.32247.32731.33699.36603.38055.41631", %"class.llvm::SDNode.310.1762.9990.10474.10958.11442.11926.12410.12894.13378.13862.15314.15798.16282.17734.19186.21122.25962.26930.29350.29834.30318.30802.31286.31770.32254.32738.33706.36610.38062.41642"*, %"class.llvm::SDUse.304.1756.9984.10468.10952.11436.11920.12404.12888.13372.13856.15308.15792.16276.17728.19180.21116.25956.26924.29344.29828.30312.30796.31280.31764.32248.32732.33700.36604.38056.41632"**, %"class.llvm::SDUse.304.1756.9984.10468.10952.11436.11920.12404.12888.13372.13856.15308.15792.16276.17728.19180.21116.25956.26924.29344.29828.30312.30796.31280.31764.32248.32732.33700.36604.38056.41632"* }
%"class.llvm::SDValue.303.1755.9983.10467.10951.11435.11919.12403.12887.13371.13855.15307.15791.16275.17727.19179.21115.25955.26923.29343.29827.30311.30795.31279.31763.32247.32731.33699.36603.38055.41631" = type <{ %"class.llvm::SDNode.310.1762.9990.10474.10958.11442.11926.12410.12894.13378.13862.15314.15798.16282.17734.19186.21122.25962.26930.29350.29834.30318.30802.31286.31770.32254.32738.33706.36610.38062.41642"*, i32, [4 x i8] }>
%"class.llvm::DebugLoc.309.1761.9989.10473.10957.11441.11925.12409.12893.13377.13861.15313.15797.16281.17733.19185.21121.25961.26929.29349.29833.30317.30801.31285.31769.32253.32737.33705.36609.38061.41641" = type { %"class.llvm::TypedTrackingMDRef.308.1760.9988.10472.10956.11440.11924.12408.12892.13376.13860.15312.15796.16280.17732.19184.21120.25960.26928.29348.29832.30316.30800.31284.31768.32252.32736.33704.36608.38060.41640" }
%"class.llvm::TypedTrackingMDRef.308.1760.9988.10472.10956.11440.11924.12408.12892.13376.13860.15312.15796.16280.17732.19184.21120.25960.26928.29348.29832.30316.30800.31284.31768.32252.32736.33704.36608.38060.41640" = type { %"class.llvm::TrackingMDRef.307.1759.9987.10471.10955.11439.11923.12407.12891.13375.13859.15311.15795.16279.17731.19183.21119.25959.26927.29347.29831.30315.30799.31283.31767.32251.32735.33703.36607.38059.41639" }
%"class.llvm::TrackingMDRef.307.1759.9987.10471.10955.11439.11923.12407.12891.13375.13859.15311.15795.16279.17731.19183.21119.25959.26927.29347.29831.30315.30799.31283.31767.32251.32735.33703.36607.38059.41639" = type { %"class.llvm::Metadata.306.1758.9986.10470.10954.11438.11922.12406.12890.13374.13858.15310.15794.16278.17730.19182.21118.25958.26926.29346.29830.30314.30798.31282.31766.32250.32734.33702.36606.38058.41638"* }
%"class.llvm::Metadata.306.1758.9986.10470.10954.11438.11922.12406.12890.13374.13858.15310.15794.16278.17730.19182.21118.25958.26926.29346.29830.30314.30798.31282.31766.32250.32734.33702.36606.38058.41638" = type { i8, i8, i16, i32 }
; Function Attrs: argmemonly nounwind
declare void @llvm.lifetime.end(i64, i8* nocapture) #0
; Function Attrs: nounwind ssp uwtable
define hidden void @fun(%"class.llvm::SDNode.310.1762.9990.10474.10958.11442.11926.12410.12894.13378.13862.15314.15798.16282.17734.19186.21122.25962.26930.29350.29834.30318.30802.31286.31770.32254.32738.33706.36610.38062.41642"* %N) #1 align 2 {
; CHECK: *
entry:
%NumOperands.i = getelementptr inbounds %"class.llvm::SDNode.310.1762.9990.10474.10958.11442.11926.12410.12894.13378.13862.15314.15798.16282.17734.19186.21122.25962.26930.29350.29834.30318.30802.31286.31770.32254.32738.33706.36610.38062.41642", %"class.llvm::SDNode.310.1762.9990.10474.10958.11442.11926.12410.12894.13378.13862.15314.15798.16282.17734.19186.21122.25962.26930.29350.29834.30318.30802.31286.31770.32254.32738.33706.36610.38062.41642"* %N, i64 0, i32 8
%0 = load i16, i16* %NumOperands.i, align 8, !tbaa !1
br i1 undef, label %for.cond.cleanup, label %for.body.lr.ph
for.body.lr.ph: ; preds = %entry
%wide.trip.count192 = zext i16 %0 to i64
br label %for.body
for.cond.cleanup: ; preds = %for.body, %entry
ret void
for.body: ; preds = %for.body, %for.body.lr.ph
%indvars.iv190 = phi i64 [ 0, %for.body.lr.ph ], [ %indvars.iv.next191, %for.body ]
call void @llvm.lifetime.end(i64 16, i8* nonnull null)
%indvars.iv.next191 = add nuw nsw i64 %indvars.iv190, 1
%exitcond193 = icmp eq i64 %indvars.iv.next191, %wide.trip.count192
br i1 %exitcond193, label %for.cond.cleanup, label %for.body
}
attributes #0 = { argmemonly nounwind }
attributes #1 = { nounwind ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" }
!llvm.ident = !{!0}
!0 = !{!"clang version 5.0.0 (trunk 297799) (llvm/trunk 297808)"}
!1 = !{!2, !3, i64 56}
!2 = !{!"_ZTSN4llvm6SDNodeE", !3, i64 24, !4, i64 26, !6, i64 28, !7, i64 32, !7, i64 40, !7, i64 48, !3, i64 56, !3, i64 58, !6, i64 60, !8, i64 64, !3, i64 72}
!3 = !{!"short", !4, i64 0}
!4 = !{!"omnipotent char", !5, i64 0}
!5 = !{!"Simple C++ TBAA"}
!6 = !{!"int", !4, i64 0}
!7 = !{!"any pointer", !4, i64 0}
!8 = !{!"_ZTSN4llvm8DebugLocE", !9, i64 0}
!9 = !{!"_ZTSN4llvm18TypedTrackingMDRefINS_6MDNodeEEE", !10, i64 0}
!10 = !{!"_ZTSN4llvm13TrackingMDRefE", !7, i64 0}

View File

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

View File

@@ -1,137 +0,0 @@
; RUN: opt < %s -cost-model -analyze -mtriple=systemz-unknown -mcpu=z13 | FileCheck %s
define void @store() {
store i8 undef, i8* undef
store i16 undef, i16* undef
store i32 undef, i32* undef
store i64 undef, i64* undef
store float undef, float* undef
store double undef, double* undef
store fp128 undef, fp128* undef
store <2 x i8> undef, <2 x i8>* undef
store <2 x i16> undef, <2 x i16>* undef
store <2 x i32> undef, <2 x i32>* undef
store <2 x i64> undef, <2 x i64>* undef
store <2 x float> undef, <2 x float>* undef
store <2 x double> undef, <2 x double>* undef
store <4 x i8> undef, <4 x i8>* undef
store <4 x i16> undef, <4 x i16>* undef
store <4 x i32> undef, <4 x i32>* undef
store <4 x i64> undef, <4 x i64>* undef
store <4 x float> undef, <4 x float>* undef
store <4 x double> undef, <4 x double>* undef
store <8 x i8> undef, <8 x i8>* undef
store <8 x i16> undef, <8 x i16>* undef
store <8 x i32> undef, <8 x i32>* undef
store <8 x i64> undef, <8 x i64>* undef
store <8 x float> undef, <8 x float>* undef
store <8 x double> undef, <8 x double>* undef
store <16 x i8> undef, <16 x i8>* undef
store <16 x i16> undef, <16 x i16>* undef
store <16 x i32> undef, <16 x i32>* undef
store <16 x i64> undef, <16 x i64>* undef
store <16 x float> undef, <16 x float>* undef
store <16 x double> undef, <16 x double>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: store i8 undef, i8* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: store i16 undef, i16* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: store i32 undef, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: store i64 undef, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: store float undef, float* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: store double undef, double* undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: store fp128 undef, fp128* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i8> undef, <2 x i8>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> undef, <2 x i16>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> undef, <2 x i32>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i64> undef, <2 x i64>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: store <2 x float> undef, <2 x float>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: store <2 x double> undef, <2 x double>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i8> undef, <4 x i8>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i16> undef, <4 x i16>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> undef, <4 x i32>* undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: store <4 x i64> undef, <4 x i64>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: store <4 x float> undef, <4 x float>* undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: store <4 x double> undef, <4 x double>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i8> undef, <8 x i8>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> undef, <8 x i16>* undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: store <8 x i32> undef, <8 x i32>* undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: store <8 x i64> undef, <8 x i64>* undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: store <8 x float> undef, <8 x float>* undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: store <8 x double> undef, <8 x double>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i8> undef, <16 x i8>* undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: store <16 x i16> undef, <16 x i16>* undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: store <16 x i32> undef, <16 x i32>* undef
; CHECK: Cost Model: Found an estimated cost of 8 for instruction: store <16 x i64> undef, <16 x i64>* undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: store <16 x float> undef, <16 x float>* undef
; CHECK: Cost Model: Found an estimated cost of 8 for instruction: store <16 x double> undef, <16 x double>* undef
ret void;
}
define void @load() {
load i8, i8* undef
load i16, i16* undef
load i32, i32* undef
load i64, i64* undef
load float, float* undef
load double, double* undef
load fp128, fp128* undef
load <2 x i8>, <2 x i8>* undef
load <2 x i16>, <2 x i16>* undef
load <2 x i32>, <2 x i32>* undef
load <2 x i64>, <2 x i64>* undef
load <2 x float>, <2 x float>* undef
load <2 x double>, <2 x double>* undef
load <4 x i8>, <4 x i8>* undef
load <4 x i16>, <4 x i16>* undef
load <4 x i32>, <4 x i32>* undef
load <4 x i64>, <4 x i64>* undef
load <4 x float>, <4 x float>* undef
load <4 x double>, <4 x double>* undef
load <8 x i8>, <8 x i8>* undef
load <8 x i16>, <8 x i16>* undef
load <8 x i32>, <8 x i32>* undef
load <8 x i64>, <8 x i64>* undef
load <8 x float>, <8 x float>* undef
load <8 x double>, <8 x double>* undef
load <16 x i8>, <16 x i8>* undef
load <16 x i16>, <16 x i16>* undef
load <16 x i32>, <16 x i32>* undef
load <16 x i64>, <16 x i64>* undef
load <16 x float>, <16 x float>* undef
load <16 x double>, <16 x double>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i8, i8* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %2 = load i16, i16* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %3 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %4 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %5 = load float, float* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %6 = load double, double* undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %7 = load fp128, fp128* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <2 x i8>, <2 x i8>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %9 = load <2 x i16>, <2 x i16>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <2 x i32>, <2 x i32>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %11 = load <2 x i64>, <2 x i64>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <2 x float>, <2 x float>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %13 = load <2 x double>, <2 x double>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <4 x i8>, <4 x i8>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %15 = load <4 x i16>, <4 x i16>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %16 = load <4 x i32>, <4 x i32>* undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %17 = load <4 x i64>, <4 x i64>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %18 = load <4 x float>, <4 x float>* undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %19 = load <4 x double>, <4 x double>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %20 = load <8 x i8>, <8 x i8>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %21 = load <8 x i16>, <8 x i16>* undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %22 = load <8 x i32>, <8 x i32>* undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %23 = load <8 x i64>, <8 x i64>* undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %24 = load <8 x float>, <8 x float>* undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %25 = load <8 x double>, <8 x double>* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %26 = load <16 x i8>, <16 x i8>* undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %27 = load <16 x i16>, <16 x i16>* undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %28 = load <16 x i32>, <16 x i32>* undef
; CHECK: Cost Model: Found an estimated cost of 8 for instruction: %29 = load <16 x i64>, <16 x i64>* undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %30 = load <16 x float>, <16 x float>* undef
; CHECK: Cost Model: Found an estimated cost of 8 for instruction: %31 = load <16 x double>, <16 x double>* undef
ret void;
}

View File

@@ -1,277 +0,0 @@
; RUN: opt < %s -cost-model -analyze -mtriple=systemz-unknown -mcpu=z13 | FileCheck %s
define void @and() {
%res0 = and i8 undef, undef
%res1 = and i16 undef, undef
%res2 = and i32 undef, undef
%res3 = and i64 undef, undef
%res4 = and <2 x i8> undef, undef
%res5 = and <2 x i16> undef, undef
%res6 = and <2 x i32> undef, undef
%res7 = and <2 x i64> undef, undef
%res8 = and <4 x i8> undef, undef
%res9 = and <4 x i16> undef, undef
%res10 = and <4 x i32> undef, undef
%res11 = and <4 x i64> undef, undef
%res12 = and <8 x i8> undef, undef
%res13 = and <8 x i16> undef, undef
%res14 = and <8 x i32> undef, undef
%res15 = and <8 x i64> undef, undef
%res16 = and <16 x i8> undef, undef
%res17 = and <16 x i16> undef, undef
%res18 = and <16 x i32> undef, undef
%res19 = and <16 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res0 = and i8 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res1 = and i16 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res2 = and i32 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res3 = and i64 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res4 = and <2 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res5 = and <2 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res6 = and <2 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res7 = and <2 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res8 = and <4 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res9 = and <4 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res10 = and <4 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res11 = and <4 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res12 = and <8 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res13 = and <8 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res14 = and <8 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res15 = and <8 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res16 = and <16 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res17 = and <16 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res18 = and <16 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 8 for instruction: %res19 = and <16 x i64> undef, undef
ret void;
}
define void @ashr() {
%res0 = ashr i8 undef, undef
%res1 = ashr i16 undef, undef
%res2 = ashr i32 undef, undef
%res3 = ashr i64 undef, undef
%res4 = ashr <2 x i8> undef, undef
%res5 = ashr <2 x i16> undef, undef
%res6 = ashr <2 x i32> undef, undef
%res7 = ashr <2 x i64> undef, undef
%res8 = ashr <4 x i8> undef, undef
%res9 = ashr <4 x i16> undef, undef
%res10 = ashr <4 x i32> undef, undef
%res11 = ashr <4 x i64> undef, undef
%res12 = ashr <8 x i8> undef, undef
%res13 = ashr <8 x i16> undef, undef
%res14 = ashr <8 x i32> undef, undef
%res15 = ashr <8 x i64> undef, undef
%res16 = ashr <16 x i8> undef, undef
%res17 = ashr <16 x i16> undef, undef
%res18 = ashr <16 x i32> undef, undef
%res19 = ashr <16 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res0 = ashr i8 undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res1 = ashr i16 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res2 = ashr i32 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res3 = ashr i64 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res4 = ashr <2 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res5 = ashr <2 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res6 = ashr <2 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res7 = ashr <2 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res8 = ashr <4 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res9 = ashr <4 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res10 = ashr <4 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res11 = ashr <4 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res12 = ashr <8 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res13 = ashr <8 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res14 = ashr <8 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res15 = ashr <8 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res16 = ashr <16 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res17 = ashr <16 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res18 = ashr <16 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 8 for instruction: %res19 = ashr <16 x i64> undef, undef
ret void;
}
define void @lshr() {
%res0 = lshr i8 undef, undef
%res1 = lshr i16 undef, undef
%res2 = lshr i32 undef, undef
%res3 = lshr i64 undef, undef
%res4 = lshr <2 x i8> undef, undef
%res5 = lshr <2 x i16> undef, undef
%res6 = lshr <2 x i32> undef, undef
%res7 = lshr <2 x i64> undef, undef
%res8 = lshr <4 x i8> undef, undef
%res9 = lshr <4 x i16> undef, undef
%res10 = lshr <4 x i32> undef, undef
%res11 = lshr <4 x i64> undef, undef
%res12 = lshr <8 x i8> undef, undef
%res13 = lshr <8 x i16> undef, undef
%res14 = lshr <8 x i32> undef, undef
%res15 = lshr <8 x i64> undef, undef
%res16 = lshr <16 x i8> undef, undef
%res17 = lshr <16 x i16> undef, undef
%res18 = lshr <16 x i32> undef, undef
%res19 = lshr <16 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res0 = lshr i8 undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res1 = lshr i16 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res2 = lshr i32 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res3 = lshr i64 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res4 = lshr <2 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res5 = lshr <2 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res6 = lshr <2 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res7 = lshr <2 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res8 = lshr <4 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res9 = lshr <4 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res10 = lshr <4 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res11 = lshr <4 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res12 = lshr <8 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res13 = lshr <8 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res14 = lshr <8 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res15 = lshr <8 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res16 = lshr <16 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res17 = lshr <16 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res18 = lshr <16 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 8 for instruction: %res19 = lshr <16 x i64> undef, undef
ret void;
}
define void @or() {
%res0 = or i8 undef, undef
%res1 = or i16 undef, undef
%res2 = or i32 undef, undef
%res3 = or i64 undef, undef
%res4 = or <2 x i8> undef, undef
%res5 = or <2 x i16> undef, undef
%res6 = or <2 x i32> undef, undef
%res7 = or <2 x i64> undef, undef
%res8 = or <4 x i8> undef, undef
%res9 = or <4 x i16> undef, undef
%res10 = or <4 x i32> undef, undef
%res11 = or <4 x i64> undef, undef
%res12 = or <8 x i8> undef, undef
%res13 = or <8 x i16> undef, undef
%res14 = or <8 x i32> undef, undef
%res15 = or <8 x i64> undef, undef
%res16 = or <16 x i8> undef, undef
%res17 = or <16 x i16> undef, undef
%res18 = or <16 x i32> undef, undef
%res19 = or <16 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res0 = or i8 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res1 = or i16 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res2 = or i32 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res3 = or i64 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res4 = or <2 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res5 = or <2 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res6 = or <2 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res7 = or <2 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res8 = or <4 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res9 = or <4 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res10 = or <4 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res11 = or <4 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res12 = or <8 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res13 = or <8 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res14 = or <8 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res15 = or <8 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res16 = or <16 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res17 = or <16 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res18 = or <16 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 8 for instruction: %res19 = or <16 x i64> undef, undef
ret void;
}
define void @shl() {
%res0 = shl i8 undef, undef
%res1 = shl i16 undef, undef
%res2 = shl i32 undef, undef
%res3 = shl i64 undef, undef
%res4 = shl <2 x i8> undef, undef
%res5 = shl <2 x i16> undef, undef
%res6 = shl <2 x i32> undef, undef
%res7 = shl <2 x i64> undef, undef
%res8 = shl <4 x i8> undef, undef
%res9 = shl <4 x i16> undef, undef
%res10 = shl <4 x i32> undef, undef
%res11 = shl <4 x i64> undef, undef
%res12 = shl <8 x i8> undef, undef
%res13 = shl <8 x i16> undef, undef
%res14 = shl <8 x i32> undef, undef
%res15 = shl <8 x i64> undef, undef
%res16 = shl <16 x i8> undef, undef
%res17 = shl <16 x i16> undef, undef
%res18 = shl <16 x i32> undef, undef
%res19 = shl <16 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res0 = shl i8 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res1 = shl i16 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res2 = shl i32 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res3 = shl i64 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res4 = shl <2 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res5 = shl <2 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res6 = shl <2 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res7 = shl <2 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res8 = shl <4 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res9 = shl <4 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res10 = shl <4 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res11 = shl <4 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res12 = shl <8 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res13 = shl <8 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res14 = shl <8 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res15 = shl <8 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res16 = shl <16 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res17 = shl <16 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res18 = shl <16 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 8 for instruction: %res19 = shl <16 x i64> undef, undef
ret void;
}
define void @xor() {
%res0 = xor i8 undef, undef
%res1 = xor i16 undef, undef
%res2 = xor i32 undef, undef
%res3 = xor i64 undef, undef
%res4 = xor <2 x i8> undef, undef
%res5 = xor <2 x i16> undef, undef
%res6 = xor <2 x i32> undef, undef
%res7 = xor <2 x i64> undef, undef
%res8 = xor <4 x i8> undef, undef
%res9 = xor <4 x i16> undef, undef
%res10 = xor <4 x i32> undef, undef
%res11 = xor <4 x i64> undef, undef
%res12 = xor <8 x i8> undef, undef
%res13 = xor <8 x i16> undef, undef
%res14 = xor <8 x i32> undef, undef
%res15 = xor <8 x i64> undef, undef
%res16 = xor <16 x i8> undef, undef
%res17 = xor <16 x i16> undef, undef
%res18 = xor <16 x i32> undef, undef
%res19 = xor <16 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res0 = xor i8 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res1 = xor i16 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res2 = xor i32 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res3 = xor i64 undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res4 = xor <2 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res5 = xor <2 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res6 = xor <2 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res7 = xor <2 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res8 = xor <4 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res9 = xor <4 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res10 = xor <4 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res11 = xor <4 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res12 = xor <8 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res13 = xor <8 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res14 = xor <8 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res15 = xor <8 x i64> undef, undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %res16 = xor <16 x i8> undef, undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %res17 = xor <16 x i16> undef, undef
; CHECK: Cost Model: Found an estimated cost of 4 for instruction: %res18 = xor <16 x i32> undef, undef
; CHECK: Cost Model: Found an estimated cost of 8 for instruction: %res19 = xor <16 x i64> undef, undef
ret void;
}

View File

@@ -1,259 +0,0 @@
; RUN: opt < %s -cost-model -analyze -mtriple=systemz-unknown -mcpu=z13 | FileCheck %s
;
; Test that loads into operations that can fold one memory operand get zero
; cost. In the case that both operands are loaded, one load should get a cost
; value.
define void @add() {
%li32 = load i32, i32* undef
add i32 %li32, undef
%li32_0 = load i32, i32* undef
%li32_1 = load i32, i32* undef
add i32 %li32_0, %li32_1
%li64 = load i64, i64* undef
add i64 %li64, undef
%li64_0 = load i64, i64* undef
%li64_1 = load i64, i64* undef
add i64 %li64_0, %li64_1
ret void;
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li32 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %1 = add i32 %li32, undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li32_0 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li32_1 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %2 = add i32 %li32_0, %li32_1
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li64 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %3 = add i64 %li64, undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li64_0 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li64_1 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %4 = add i64 %li64_0, %li64_1
}
define void @sub() {
%li32 = load i32, i32* undef
sub i32 %li32, undef
%li32_0 = load i32, i32* undef
%li32_1 = load i32, i32* undef
sub i32 %li32_0, %li32_1
%li64 = load i64, i64* undef
sub i64 %li64, undef
%li64_0 = load i64, i64* undef
%li64_1 = load i64, i64* undef
sub i64 %li64_0, %li64_1
ret void;
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li32 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %1 = sub i32 %li32, undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li32_0 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li32_1 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %2 = sub i32 %li32_0, %li32_1
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li64 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %3 = sub i64 %li64, undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li64_0 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li64_1 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %4 = sub i64 %li64_0, %li64_1
}
define void @mul() {
%li32 = load i32, i32* undef
mul i32 %li32, undef
%li32_0 = load i32, i32* undef
%li32_1 = load i32, i32* undef
mul i32 %li32_0, %li32_1
%li64 = load i64, i64* undef
mul i64 %li64, undef
%li64_0 = load i64, i64* undef
%li64_1 = load i64, i64* undef
mul i64 %li64_0, %li64_1
ret void;
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li32 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %1 = mul i32 %li32, undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li32_0 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li32_1 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %2 = mul i32 %li32_0, %li32_1
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li64 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %3 = mul i64 %li64, undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li64_0 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li64_1 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %4 = mul i64 %li64_0, %li64_1
}
define void @sdiv() {
%li32 = load i32, i32* undef
sdiv i32 %li32, undef
%li32_0 = load i32, i32* undef
%li32_1 = load i32, i32* undef
sdiv i32 %li32_0, %li32_1
%li64 = load i64, i64* undef
sdiv i64 %li64, undef
%li64_0 = load i64, i64* undef
%li64_1 = load i64, i64* undef
sdiv i64 %li64_0, %li64_1
ret void;
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li32 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %1 = sdiv i32 %li32, undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li32_0 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li32_1 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %2 = sdiv i32 %li32_0, %li32_1
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li64 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %3 = sdiv i64 %li64, undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li64_0 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li64_1 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %4 = sdiv i64 %li64_0, %li64_1
}
define void @udiv() {
%li32 = load i32, i32* undef
udiv i32 %li32, undef
%li32_0 = load i32, i32* undef
%li32_1 = load i32, i32* undef
udiv i32 %li32_0, %li32_1
%li64 = load i64, i64* undef
udiv i64 %li64, undef
%li64_0 = load i64, i64* undef
%li64_1 = load i64, i64* undef
udiv i64 %li64_0, %li64_1
ret void;
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li32 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %1 = udiv i32 %li32, undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li32_0 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li32_1 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %2 = udiv i32 %li32_0, %li32_1
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li64 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %3 = udiv i64 %li64, undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li64_0 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li64_1 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %4 = udiv i64 %li64_0, %li64_1
}
define void @and() {
%li32 = load i32, i32* undef
and i32 %li32, undef
%li32_0 = load i32, i32* undef
%li32_1 = load i32, i32* undef
and i32 %li32_0, %li32_1
%li64 = load i64, i64* undef
and i64 %li64, undef
%li64_0 = load i64, i64* undef
%li64_1 = load i64, i64* undef
and i64 %li64_0, %li64_1
ret void;
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li32 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %1 = and i32 %li32, undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li32_0 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li32_1 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %2 = and i32 %li32_0, %li32_1
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li64 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %3 = and i64 %li64, undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li64_0 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li64_1 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %4 = and i64 %li64_0, %li64_1
}
define void @or() {
%li32 = load i32, i32* undef
or i32 %li32, undef
%li32_0 = load i32, i32* undef
%li32_1 = load i32, i32* undef
or i32 %li32_0, %li32_1
%li64 = load i64, i64* undef
or i64 %li64, undef
%li64_0 = load i64, i64* undef
%li64_1 = load i64, i64* undef
or i64 %li64_0, %li64_1
ret void;
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li32 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %1 = or i32 %li32, undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li32_0 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li32_1 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %2 = or i32 %li32_0, %li32_1
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li64 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %3 = or i64 %li64, undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li64_0 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li64_1 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %4 = or i64 %li64_0, %li64_1
}
define void @xor() {
%li32 = load i32, i32* undef
xor i32 %li32, undef
%li32_0 = load i32, i32* undef
%li32_1 = load i32, i32* undef
xor i32 %li32_0, %li32_1
%li64 = load i64, i64* undef
xor i64 %li64, undef
%li64_0 = load i64, i64* undef
%li64_1 = load i64, i64* undef
xor i64 %li64_0, %li64_1
ret void;
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li32 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %1 = xor i32 %li32, undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li32_0 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li32_1 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %2 = xor i32 %li32_0, %li32_1
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li64 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %3 = xor i64 %li64, undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li64_0 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li64_1 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %4 = xor i64 %li64_0, %li64_1
}
define void @icmp() {
%li32 = load i32, i32* undef
icmp eq i32 %li32, undef
%li32_0 = load i32, i32* undef
%li32_1 = load i32, i32* undef
icmp eq i32 %li32_0, %li32_1
%li64 = load i64, i64* undef
icmp eq i64 %li64, undef
%li64_0 = load i64, i64* undef
%li64_1 = load i64, i64* undef
icmp eq i64 %li64_0, %li64_1
ret void;
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li32 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %1 = icmp eq i32 %li32, undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li32_0 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li32_1 = load i32, i32* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %2 = icmp eq i32 %li32_0, %li32_1
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li64 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %3 = icmp eq i64 %li64, undef
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %li64_0 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %li64_1 = load i64, i64* undef
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %4 = icmp eq i64 %li64_0, %li64_1
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,112 +0,0 @@
; RUN: opt < %s -cost-model -analyze -mtriple=systemz-unknown -mcpu=z13 | FileCheck %s
; CHECK: shuffle
define void @shuffle() {
;; Reverse shuffles
shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> <i32 1, i32 0>
shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
shufflevector <2 x i16> undef, <2 x i16> undef, <2 x i32> <i32 1, i32 0>
shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> <i32 1, i32 0>
shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> <i32 1, i32 0>
shufflevector <2 x i64> undef, <2 x i64> undef, <2 x i32> <i32 1, i32 0>
shufflevector <2 x double> undef, <2 x double> undef, <2 x i32> <i32 1, i32 0>
;; Alternate shuffles
shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> <i32 0, i32 17, i32 2, i32 19, i32 4, i32 21, i32 6, i32 23, i32 8, i32 25, i32 10, i32 27, i32 12, i32 29, i32 14, i32 31>
shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> <i32 16, i32 1, i32 18, i32 3, i32 20, i32 5, i32 22, i32 7, i32 24, i32 9, i32 26, i32 11, i32 28, i32 13, i32 30, i32 15>
shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> <i32 0, i32 9, i32 2, i32 11, i32 4, i32 13, i32 6, i32 15>
shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> <i32 8, i32 1, i32 10, i32 3, i32 12, i32 5, i32 14, i32 7>
shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> <i32 0, i32 5, i32 2, i32 7>
shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> <i32 4, i32 1, i32 6, i32 3>
shufflevector <2 x i64> undef, <2 x i64> undef, <2 x i32> <i32 0, i32 3>
shufflevector <2 x i64> undef, <2 x i64> undef, <2 x i32> <i32 2, i32 1>
shufflevector <2 x double> undef, <2 x double> undef, <2 x i32> <i32 0, i32 3>
shufflevector <2 x double> undef, <2 x double> undef, <2 x i32> <i32 2, i32 1>
;; Broadcast shuffles
shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> zeroinitializer
shufflevector <32 x i8> undef, <32 x i8> undef, <32 x i32> zeroinitializer
shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> zeroinitializer
shufflevector <16 x i16> undef, <16 x i16> undef, <16 x i32> zeroinitializer
shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> zeroinitializer
shufflevector <8 x i32> undef, <8 x i32> undef, <8 x i32> zeroinitializer
shufflevector <2 x i64> undef, <2 x i64> undef, <2 x i32> zeroinitializer
shufflevector <4 x i64> undef, <4 x i64> undef, <4 x i32> zeroinitializer
shufflevector <2 x double> undef, <2 x double> undef, <2 x i32> zeroinitializer
shufflevector <4 x double> undef, <4 x double> undef, <4 x i32> zeroinitializer
;; Random shuffles
shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> <i32 4, i32 17, i32 2, i32 19, i32 0, i32 21, i32 8, i32 23, i32 6, i32 10, i32 10, i32 27, i32 29, i32 29, i32 14, i32 31>
shufflevector <18 x i8> undef, <18 x i8> undef, <18 x i32> <i32 4, i32 17, i32 2, i32 19, i32 0, i32 21, i32 8, i32 23, i32 6, i32 10, i32 10, i32 27, i32 29, i32 29, i32 14, i32 31, i32 0, i32 1>
shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> <i32 9, i32 9, i32 2, i32 2, i32 4, i32 13, i32 15, i32 15>
shufflevector <12 x i16> undef, <12 x i16> undef, <12 x i32> <i32 9, i32 9, i32 2, i32 2, i32 4, i32 13, i32 15, i32 15, i32 9, i32 2, i32 2, i32 4>
shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> <i32 0, i32 0, i32 4, i32 7>
shufflevector <6 x i32> undef, <6 x i32> undef, <6 x i32> <i32 0, i32 0, i32 4, i32 7, i32 4, i32 7>
shufflevector <2 x i64> undef, <2 x i64> undef, <2 x i32> <i32 1, i32 2>
shufflevector <4 x i64> undef, <4 x i64> undef, <4 x i32> <i32 1, i32 2, i32 0, i32 2>
shufflevector <2 x double> undef, <2 x double> undef, <2 x i32> <i32 2, i32 1>
shufflevector <4 x double> undef, <4 x double> undef, <4 x i32> <i32 2, i32 1, i32 0, i32 2>
ret void
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %1 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %2 = shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> <i32 1, i32 0>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %3 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %4 = shufflevector <2 x i16> undef, <2 x i16> undef, <2 x i32> <i32 1, i32 0>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %5 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %6 = shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> <i32 1, i32 0>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %7 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %8 = shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> <i32 1, i32 0>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %9 = shufflevector <2 x i64> undef, <2 x i64> undef, <2 x i32> <i32 1, i32 0>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %10 = shufflevector <2 x double> undef, <2 x double> undef, <2 x i32> <i32 1, i32 0>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %11 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> <i32 0, i32 17, i32 2, i32 19, i32 4, i32 21, i32 6, i32 23, i32 8, i32 25, i32 10, i32 27, i32 12, i32 29, i32 14, i32 31>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %12 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> <i32 16, i32 1, i32 18, i32 3, i32 20, i32 5, i32 22, i32 7, i32 24, i32 9, i32 26, i32 11, i32 28, i32 13, i32 30, i32 15>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %13 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> <i32 0, i32 9, i32 2, i32 11, i32 4, i32 13, i32 6, i32 15>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %14 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> <i32 8, i32 1, i32 10, i32 3, i32 12, i32 5, i32 14, i32 7>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %15 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> <i32 0, i32 5, i32 2, i32 7>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %16 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> <i32 4, i32 1, i32 6, i32 3>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %17 = shufflevector <2 x i64> undef, <2 x i64> undef, <2 x i32> <i32 0, i32 3>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %18 = shufflevector <2 x i64> undef, <2 x i64> undef, <2 x i32> <i32 2, i32 1>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %19 = shufflevector <2 x double> undef, <2 x double> undef, <2 x i32> <i32 0, i32 3>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %20 = shufflevector <2 x double> undef, <2 x double> undef, <2 x i32> <i32 2, i32 1>
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %21 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> zeroinitializer
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %22 = shufflevector <32 x i8> undef, <32 x i8> undef, <32 x i32> zeroinitializer
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %23 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> zeroinitializer
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %24 = shufflevector <16 x i16> undef, <16 x i16> undef, <16 x i32> zeroinitializer
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %25 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> zeroinitializer
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %26 = shufflevector <8 x i32> undef, <8 x i32> undef, <8 x i32> zeroinitializer
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %27 = shufflevector <2 x i64> undef, <2 x i64> undef, <2 x i32> zeroinitializer
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %28 = shufflevector <4 x i64> undef, <4 x i64> undef, <4 x i32> zeroinitializer
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %29 = shufflevector <2 x double> undef, <2 x double> undef, <2 x i32> zeroinitializer
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %30 = shufflevector <4 x double> undef, <4 x double> undef, <4 x i32> zeroinitializer
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %31 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> <i32 4, i32 17, i32 2, i32 19, i32 0, i32 21, i32 8, i32 23, i32 6, i32 10, i32 10, i32 27, i32 29, i32 29, i32 14, i32 31>
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %32 = shufflevector <18 x i8> undef, <18 x i8> undef, <18 x i32> <i32 4, i32 17, i32 2, i32 19, i32 0, i32 21, i32 8, i32 23, i32 6, i32 10, i32 10, i32 27, i32 29, i32 29, i32 14, i32 31, i32 0, i32 1>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %33 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> <i32 9, i32 9, i32 2, i32 2, i32 4, i32 13, i32 15, i32 15>
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %34 = shufflevector <12 x i16> undef, <12 x i16> undef, <12 x i32> <i32 9, i32 9, i32 2, i32 2, i32 4, i32 13, i32 15, i32 15, i32 9, i32 2, i32 2, i32 4>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %35 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> <i32 0, i32 0, i32 4, i32 7>
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %36 = shufflevector <6 x i32> undef, <6 x i32> undef, <6 x i32> <i32 0, i32 0, i32 4, i32 7, i32 4, i32 7>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %37 = shufflevector <2 x i64> undef, <2 x i64> undef, <2 x i32> <i32 1, i32 2>
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %38 = shufflevector <4 x i64> undef, <4 x i64> undef, <4 x i32> <i32 1, i32 2, i32 0, i32 2>
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %39 = shufflevector <2 x double> undef, <2 x double> undef, <2 x i32> <i32 2, i32 1>
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %40 = shufflevector <4 x double> undef, <4 x double> undef, <4 x i32> <i32 2, i32 1, i32 0, i32 2>
}

View File

@@ -1,56 +0,0 @@
; RUN: opt < %s -cost-model -analyze -mtriple=systemz-unknown -mcpu=z13 | FileCheck %s
; CHECK: vecinstrs
define void @vecinstrs() {
;; Extract element is penalized somewhat with a cost of 2 for index 0.
extractelement <16 x i8> undef, i32 0
extractelement <16 x i8> undef, i32 1
extractelement <8 x i16> undef, i32 0
extractelement <8 x i16> undef, i32 1
extractelement <4 x i32> undef, i32 0
extractelement <4 x i32> undef, i32 1
extractelement <2 x i64> undef, i32 0
extractelement <2 x i64> undef, i32 1
extractelement <2 x double> undef, i32 0
extractelement <2 x double> undef, i32 1
; Extraction of i1 means extract + test under mask before branch.
extractelement <2 x i1> undef, i32 0
extractelement <4 x i1> undef, i32 1
extractelement <8 x i1> undef, i32 2
;; Insert element
insertelement <16 x i8> undef, i8 undef, i32 0
insertelement <8 x i16> undef, i16 undef, i32 0
insertelement <4 x i32> undef, i32 undef, i32 0
; vlvgp will do two grs into a vector register: only add cost half of the time.
insertelement <2 x i64> undef, i64 undef, i32 0
insertelement <2 x i64> undef, i64 undef, i32 1
ret void
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %1 = extractelement <16 x i8> undef, i32 0
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %2 = extractelement <16 x i8> undef, i32 1
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %3 = extractelement <8 x i16> undef, i32 0
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %4 = extractelement <8 x i16> undef, i32 1
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %5 = extractelement <4 x i32> undef, i32 0
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %6 = extractelement <4 x i32> undef, i32 1
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %7 = extractelement <2 x i64> undef, i32 0
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %8 = extractelement <2 x i64> undef, i32 1
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %9 = extractelement <2 x double> undef, i32 0
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %10 = extractelement <2 x double> undef, i32 1
; CHECK: Cost Model: Found an estimated cost of 3 for instruction: %11 = extractelement <2 x i1> undef, i32 0
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %12 = extractelement <4 x i1> undef, i32 1
; CHECK: Cost Model: Found an estimated cost of 2 for instruction: %13 = extractelement <8 x i1> undef, i32 2
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %14 = insertelement <16 x i8> undef, i8 undef, i32 0
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %15 = insertelement <8 x i16> undef, i16 undef, i32 0
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %16 = insertelement <4 x i32> undef, i32 undef, i32 0
; CHECK: Cost Model: Found an estimated cost of 1 for instruction: %17 = insertelement <2 x i64> undef, i64 undef, i32 0
; CHECK: Cost Model: Found an estimated cost of 0 for instruction: %18 = insertelement <2 x i64> undef, i64 undef, i32 1
}