forked from OSchip/llvm-project
[ARM] Add or update a number of costmodel tests. NFC
This adds a number of cost model tests for ARM, useful for MVE. It also re-jigs some of the existing tests to make them easier to update and read. llvm-svn: 368586
This commit is contained in:
parent
8095449e68
commit
84cb4b2b53
|
@ -0,0 +1,419 @@
|
|||
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
|
||||
; RUN: opt -cost-model -analyze -mtriple=thumbv8.1-m.main-none-eabi -mattr=+mve < %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-MVE2
|
||||
|
||||
define void @i8() {
|
||||
; CHECK-LABEL: 'i8'
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = add i8 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d = sub i8 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = mul i8 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f = ashr i8 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g = lshr i8 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h = shl i8 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i = and i8 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j = or i8 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k = xor i8 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
%c = add i8 undef, undef
|
||||
%d = sub i8 undef, undef
|
||||
%e = mul i8 undef, undef
|
||||
%f = ashr i8 undef, undef
|
||||
%g = lshr i8 undef, undef
|
||||
%h = shl i8 undef, undef
|
||||
%i = and i8 undef, undef
|
||||
%j = or i8 undef, undef
|
||||
%k = xor i8 undef, undef
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @i16() {
|
||||
; CHECK-LABEL: 'i16'
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = add i16 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d = sub i16 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = mul i16 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f = ashr i16 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g = lshr i16 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h = shl i16 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i = and i16 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j = or i16 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k = xor i16 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
%c = add i16 undef, undef
|
||||
%d = sub i16 undef, undef
|
||||
%e = mul i16 undef, undef
|
||||
%f = ashr i16 undef, undef
|
||||
%g = lshr i16 undef, undef
|
||||
%h = shl i16 undef, undef
|
||||
%i = and i16 undef, undef
|
||||
%j = or i16 undef, undef
|
||||
%k = xor i16 undef, undef
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @i32() {
|
||||
; CHECK-LABEL: 'i32'
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c = add i32 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d = sub i32 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e = mul i32 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %f = ashr i32 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %g = lshr i32 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %h = shl i32 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i = and i32 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j = or i32 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k = xor i32 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
%c = add i32 undef, undef
|
||||
%d = sub i32 undef, undef
|
||||
%e = mul i32 undef, undef
|
||||
%f = ashr i32 undef, undef
|
||||
%g = lshr i32 undef, undef
|
||||
%h = shl i32 undef, undef
|
||||
%i = and i32 undef, undef
|
||||
%j = or i32 undef, undef
|
||||
%k = xor i32 undef, undef
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @i64() {
|
||||
; CHECK-LABEL: 'i64'
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c = add i64 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d = sub i64 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e = mul i64 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f = ashr i64 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %g = lshr i64 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %h = shl i64 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i = and i64 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %j = or i64 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %k = xor i64 undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
%c = add i64 undef, undef
|
||||
%d = sub i64 undef, undef
|
||||
%e = mul i64 undef, undef
|
||||
%f = ashr i64 undef, undef
|
||||
%g = lshr i64 undef, undef
|
||||
%h = shl i64 undef, undef
|
||||
%i = and i64 undef, undef
|
||||
%j = or i64 undef, undef
|
||||
%k = xor i64 undef, undef
|
||||
ret void
|
||||
}
|
||||
|
||||
|
||||
define void @vi8() {
|
||||
; CHECK-LABEL: 'vi8'
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %c2 = add <2 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %d2 = sub <2 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %e2 = mul <2 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %f2 = ashr <2 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %g2 = lshr <2 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %h2 = shl <2 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = and <2 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j2 = or <2 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k2 = xor <2 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c4 = add <4 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d4 = sub <4 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e4 = mul <4 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f4 = ashr <4 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %g4 = lshr <4 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %h4 = shl <4 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i4 = and <4 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j4 = or <4 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k4 = xor <4 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c8 = add <8 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d8 = sub <8 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e8 = mul <8 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f8 = ashr <8 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %g8 = lshr <8 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %h8 = shl <8 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i8 = and <8 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j8 = or <8 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k8 = xor <8 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c16 = add <16 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d16 = sub <16 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e16 = mul <16 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f16 = ashr <16 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %g16 = lshr <16 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %h16 = shl <16 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i16 = and <16 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j16 = or <16 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k16 = xor <16 x i8> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
%c2 = add <2 x i8> undef, undef
|
||||
%d2 = sub <2 x i8> undef, undef
|
||||
%e2 = mul <2 x i8> undef, undef
|
||||
%f2 = ashr <2 x i8> undef, undef
|
||||
%g2 = lshr <2 x i8> undef, undef
|
||||
%h2 = shl <2 x i8> undef, undef
|
||||
%i2 = and <2 x i8> undef, undef
|
||||
%j2 = or <2 x i8> undef, undef
|
||||
%k2 = xor <2 x i8> undef, undef
|
||||
%c4 = add <4 x i8> undef, undef
|
||||
%d4 = sub <4 x i8> undef, undef
|
||||
%e4 = mul <4 x i8> undef, undef
|
||||
%f4 = ashr <4 x i8> undef, undef
|
||||
%g4 = lshr <4 x i8> undef, undef
|
||||
%h4 = shl <4 x i8> undef, undef
|
||||
%i4 = and <4 x i8> undef, undef
|
||||
%j4 = or <4 x i8> undef, undef
|
||||
%k4 = xor <4 x i8> undef, undef
|
||||
%c8 = add <8 x i8> undef, undef
|
||||
%d8 = sub <8 x i8> undef, undef
|
||||
%e8 = mul <8 x i8> undef, undef
|
||||
%f8 = ashr <8 x i8> undef, undef
|
||||
%g8 = lshr <8 x i8> undef, undef
|
||||
%h8 = shl <8 x i8> undef, undef
|
||||
%i8 = and <8 x i8> undef, undef
|
||||
%j8 = or <8 x i8> undef, undef
|
||||
%k8 = xor <8 x i8> undef, undef
|
||||
%c16 = add <16 x i8> undef, undef
|
||||
%d16 = sub <16 x i8> undef, undef
|
||||
%e16 = mul <16 x i8> undef, undef
|
||||
%f16 = ashr <16 x i8> undef, undef
|
||||
%g16 = lshr <16 x i8> undef, undef
|
||||
%h16 = shl <16 x i8> undef, undef
|
||||
%i16 = and <16 x i8> undef, undef
|
||||
%j16 = or <16 x i8> undef, undef
|
||||
%k16 = xor <16 x i8> undef, undef
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @vi16() {
|
||||
; CHECK-LABEL: 'vi16'
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %c2 = add <2 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %d2 = sub <2 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %e2 = mul <2 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %f2 = ashr <2 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %g2 = lshr <2 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %h2 = shl <2 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = and <2 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j2 = or <2 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k2 = xor <2 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c4 = add <4 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d4 = sub <4 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e4 = mul <4 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f4 = ashr <4 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %g4 = lshr <4 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %h4 = shl <4 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i4 = and <4 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j4 = or <4 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k4 = xor <4 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c8 = add <8 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d8 = sub <8 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e8 = mul <8 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f8 = ashr <8 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %g8 = lshr <8 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %h8 = shl <8 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i8 = and <8 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j8 = or <8 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k8 = xor <8 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c16 = add <16 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d16 = sub <16 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e16 = mul <16 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f16 = ashr <16 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %g16 = lshr <16 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %h16 = shl <16 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i16 = and <16 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %j16 = or <16 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %k16 = xor <16 x i16> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
%c2 = add <2 x i16> undef, undef
|
||||
%d2 = sub <2 x i16> undef, undef
|
||||
%e2 = mul <2 x i16> undef, undef
|
||||
%f2 = ashr <2 x i16> undef, undef
|
||||
%g2 = lshr <2 x i16> undef, undef
|
||||
%h2 = shl <2 x i16> undef, undef
|
||||
%i2 = and <2 x i16> undef, undef
|
||||
%j2 = or <2 x i16> undef, undef
|
||||
%k2 = xor <2 x i16> undef, undef
|
||||
%c4 = add <4 x i16> undef, undef
|
||||
%d4 = sub <4 x i16> undef, undef
|
||||
%e4 = mul <4 x i16> undef, undef
|
||||
%f4 = ashr <4 x i16> undef, undef
|
||||
%g4 = lshr <4 x i16> undef, undef
|
||||
%h4 = shl <4 x i16> undef, undef
|
||||
%i4 = and <4 x i16> undef, undef
|
||||
%j4 = or <4 x i16> undef, undef
|
||||
%k4 = xor <4 x i16> undef, undef
|
||||
%c8 = add <8 x i16> undef, undef
|
||||
%d8 = sub <8 x i16> undef, undef
|
||||
%e8 = mul <8 x i16> undef, undef
|
||||
%f8 = ashr <8 x i16> undef, undef
|
||||
%g8 = lshr <8 x i16> undef, undef
|
||||
%h8 = shl <8 x i16> undef, undef
|
||||
%i8 = and <8 x i16> undef, undef
|
||||
%j8 = or <8 x i16> undef, undef
|
||||
%k8 = xor <8 x i16> undef, undef
|
||||
%c16 = add <16 x i16> undef, undef
|
||||
%d16 = sub <16 x i16> undef, undef
|
||||
%e16 = mul <16 x i16> undef, undef
|
||||
%f16 = ashr <16 x i16> undef, undef
|
||||
%g16 = lshr <16 x i16> undef, undef
|
||||
%h16 = shl <16 x i16> undef, undef
|
||||
%i16 = and <16 x i16> undef, undef
|
||||
%j16 = or <16 x i16> undef, undef
|
||||
%k16 = xor <16 x i16> undef, undef
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @vi32() {
|
||||
; CHECK-LABEL: 'vi32'
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %c2 = add <2 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %d2 = sub <2 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %e2 = mul <2 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %f2 = ashr <2 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %g2 = lshr <2 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 14 for instruction: %h2 = shl <2 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = and <2 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j2 = or <2 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k2 = xor <2 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %c4 = add <4 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %d4 = sub <4 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %e4 = mul <4 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %f4 = ashr <4 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %g4 = lshr <4 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %h4 = shl <4 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i4 = and <4 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j4 = or <4 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k4 = xor <4 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c8 = add <8 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d8 = sub <8 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e8 = mul <8 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %f8 = ashr <8 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %g8 = lshr <8 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %h8 = shl <8 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i8 = and <8 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %j8 = or <8 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %k8 = xor <8 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %c16 = add <16 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %d16 = sub <16 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %e16 = mul <16 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %f16 = ashr <16 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %g16 = lshr <16 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %h16 = shl <16 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i16 = and <16 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j16 = or <16 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k16 = xor <16 x i32> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
%c2 = add <2 x i32> undef, undef
|
||||
%d2 = sub <2 x i32> undef, undef
|
||||
%e2 = mul <2 x i32> undef, undef
|
||||
%f2 = ashr <2 x i32> undef, undef
|
||||
%g2 = lshr <2 x i32> undef, undef
|
||||
%h2 = shl <2 x i32> undef, undef
|
||||
%i2 = and <2 x i32> undef, undef
|
||||
%j2 = or <2 x i32> undef, undef
|
||||
%k2 = xor <2 x i32> undef, undef
|
||||
%c4 = add <4 x i32> undef, undef
|
||||
%d4 = sub <4 x i32> undef, undef
|
||||
%e4 = mul <4 x i32> undef, undef
|
||||
%f4 = ashr <4 x i32> undef, undef
|
||||
%g4 = lshr <4 x i32> undef, undef
|
||||
%h4 = shl <4 x i32> undef, undef
|
||||
%i4 = and <4 x i32> undef, undef
|
||||
%j4 = or <4 x i32> undef, undef
|
||||
%k4 = xor <4 x i32> undef, undef
|
||||
%c8 = add <8 x i32> undef, undef
|
||||
%d8 = sub <8 x i32> undef, undef
|
||||
%e8 = mul <8 x i32> undef, undef
|
||||
%f8 = ashr <8 x i32> undef, undef
|
||||
%g8 = lshr <8 x i32> undef, undef
|
||||
%h8 = shl <8 x i32> undef, undef
|
||||
%i8 = and <8 x i32> undef, undef
|
||||
%j8 = or <8 x i32> undef, undef
|
||||
%k8 = xor <8 x i32> undef, undef
|
||||
%c16 = add <16 x i32> undef, undef
|
||||
%d16 = sub <16 x i32> undef, undef
|
||||
%e16 = mul <16 x i32> undef, undef
|
||||
%f16 = ashr <16 x i32> undef, undef
|
||||
%g16 = lshr <16 x i32> undef, undef
|
||||
%h16 = shl <16 x i32> undef, undef
|
||||
%i16 = and <16 x i32> undef, undef
|
||||
%j16 = or <16 x i32> undef, undef
|
||||
%k16 = xor <16 x i32> undef, undef
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @vi64() {
|
||||
; CHECK-LABEL: 'vi64'
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %c2 = add <2 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %d2 = sub <2 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %e2 = mul <2 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %f2 = ashr <2 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %g2 = lshr <2 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %h2 = shl <2 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %i2 = and <2 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %j2 = or <2 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %k2 = xor <2 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %c4 = add <4 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %d4 = sub <4 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %e4 = mul <4 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %f4 = ashr <4 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %g4 = lshr <4 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %h4 = shl <4 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %i4 = and <4 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %j4 = or <4 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %k4 = xor <4 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %c8 = add <8 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %d8 = sub <8 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %e8 = mul <8 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %f8 = ashr <8 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %g8 = lshr <8 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 64 for instruction: %h8 = shl <8 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %i8 = and <8 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %j8 = or <8 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %k8 = xor <8 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %c16 = add <16 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %d16 = sub <16 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %e16 = mul <16 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %f16 = ashr <16 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %g16 = lshr <16 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 128 for instruction: %h16 = shl <16 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %i16 = and <16 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %j16 = or <16 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %k16 = xor <16 x i64> undef, undef
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
%c2 = add <2 x i64> undef, undef
|
||||
%d2 = sub <2 x i64> undef, undef
|
||||
%e2 = mul <2 x i64> undef, undef
|
||||
%f2 = ashr <2 x i64> undef, undef
|
||||
%g2 = lshr <2 x i64> undef, undef
|
||||
%h2 = shl <2 x i64> undef, undef
|
||||
%i2 = and <2 x i64> undef, undef
|
||||
%j2 = or <2 x i64> undef, undef
|
||||
%k2 = xor <2 x i64> undef, undef
|
||||
%c4 = add <4 x i64> undef, undef
|
||||
%d4 = sub <4 x i64> undef, undef
|
||||
%e4 = mul <4 x i64> undef, undef
|
||||
%f4 = ashr <4 x i64> undef, undef
|
||||
%g4 = lshr <4 x i64> undef, undef
|
||||
%h4 = shl <4 x i64> undef, undef
|
||||
%i4 = and <4 x i64> undef, undef
|
||||
%j4 = or <4 x i64> undef, undef
|
||||
%k4 = xor <4 x i64> undef, undef
|
||||
%c8 = add <8 x i64> undef, undef
|
||||
%d8 = sub <8 x i64> undef, undef
|
||||
%e8 = mul <8 x i64> undef, undef
|
||||
%f8 = ashr <8 x i64> undef, undef
|
||||
%g8 = lshr <8 x i64> undef, undef
|
||||
%h8 = shl <8 x i64> undef, undef
|
||||
%i8 = and <8 x i64> undef, undef
|
||||
%j8 = or <8 x i64> undef, undef
|
||||
%k8 = xor <8 x i64> undef, undef
|
||||
%c16 = add <16 x i64> undef, undef
|
||||
%d16 = sub <16 x i64> undef, undef
|
||||
%e16 = mul <16 x i64> undef, undef
|
||||
%f16 = ashr <16 x i64> undef, undef
|
||||
%g16 = lshr <16 x i64> undef, undef
|
||||
%h16 = shl <16 x i64> undef, undef
|
||||
%i16 = and <16 x i64> undef, undef
|
||||
%j16 = or <16 x i64> undef, undef
|
||||
%k16 = xor <16 x i64> undef, undef
|
||||
ret void
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,172 @@
|
|||
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
|
||||
; RUN: opt -cost-model -analyze -mtriple=thumbv8.1-m.main-none-eabi -mattr=+mve < %s | FileCheck %s --check-prefix=CHECK-MVE
|
||||
; RUN: opt -cost-model -analyze -mtriple=thumbv8.1-m.main-none-eabi -mattr=+mve.fp < %s | FileCheck %s --check-prefix=CHECK-MVEFP
|
||||
|
||||
define void @f32() {
|
||||
; CHECK-MVE-LABEL: 'f32'
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c = fadd float undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d = fsub float undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e = fmul float undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
; CHECK-MVEFP-LABEL: 'f32'
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c = fadd float undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d = fsub float undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e = fmul float undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
%c = fadd float undef, undef
|
||||
%d = fsub float undef, undef
|
||||
%e = fmul float undef, undef
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @f16() {
|
||||
; CHECK-MVE-LABEL: 'f16'
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c = fadd half undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d = fsub half undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e = fmul half undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
; CHECK-MVEFP-LABEL: 'f16'
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c = fadd half undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d = fsub half undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e = fmul half undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
%c = fadd half undef, undef
|
||||
%d = fsub half undef, undef
|
||||
%e = fmul half undef, undef
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @f64() {
|
||||
; CHECK-MVE-LABEL: 'f64'
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c = fadd double undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d = fsub double undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e = fmul double undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
; CHECK-MVEFP-LABEL: 'f64'
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c = fadd double undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d = fsub double undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e = fmul double undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
%c = fadd double undef, undef
|
||||
%d = fsub double undef, undef
|
||||
%e = fmul double undef, undef
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @vf32() {
|
||||
; CHECK-MVE-LABEL: 'vf32'
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %c2 = fadd <2 x float> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %d2 = fsub <2 x float> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %e2 = fmul <2 x float> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %c4 = fadd <4 x float> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %d4 = fsub <4 x float> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %e4 = fmul <4 x float> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %c8 = fadd <8 x float> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %d8 = fsub <8 x float> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %e8 = fmul <8 x float> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
; CHECK-MVEFP-LABEL: 'vf32'
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c2 = fadd <2 x float> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d2 = fsub <2 x float> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e2 = fmul <2 x float> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c4 = fadd <4 x float> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d4 = fsub <4 x float> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e4 = fmul <4 x float> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %c8 = fadd <8 x float> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %d8 = fsub <8 x float> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %e8 = fmul <8 x float> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
%c2 = fadd <2 x float> undef, undef
|
||||
%d2 = fsub <2 x float> undef, undef
|
||||
%e2 = fmul <2 x float> undef, undef
|
||||
%c4 = fadd <4 x float> undef, undef
|
||||
%d4 = fsub <4 x float> undef, undef
|
||||
%e4 = fmul <4 x float> undef, undef
|
||||
%c8 = fadd <8 x float> undef, undef
|
||||
%d8 = fsub <8 x float> undef, undef
|
||||
%e8 = fmul <8 x float> undef, undef
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @vf16() {
|
||||
; CHECK-MVE-LABEL: 'vf16'
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %c2 = fadd <2 x half> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %d2 = fsub <2 x half> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 12 for instruction: %e2 = fmul <2 x half> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %c4 = fadd <4 x half> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %d4 = fsub <4 x half> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 24 for instruction: %e4 = fmul <4 x half> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %c8 = fadd <8 x half> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %d8 = fsub <8 x half> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 48 for instruction: %e8 = fmul <8 x half> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
; CHECK-MVEFP-LABEL: 'vf16'
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c2 = fadd <2 x half> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d2 = fsub <2 x half> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e2 = fmul <2 x half> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c4 = fadd <4 x half> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d4 = fsub <4 x half> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e4 = fmul <4 x half> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %c8 = fadd <8 x half> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %d8 = fsub <8 x half> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %e8 = fmul <8 x half> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
%c2 = fadd <2 x half> undef, undef
|
||||
%d2 = fsub <2 x half> undef, undef
|
||||
%e2 = fmul <2 x half> undef, undef
|
||||
%c4 = fadd <4 x half> undef, undef
|
||||
%d4 = fsub <4 x half> undef, undef
|
||||
%e4 = fmul <4 x half> undef, undef
|
||||
%c8 = fadd <8 x half> undef, undef
|
||||
%d8 = fsub <8 x half> undef, undef
|
||||
%e8 = fmul <8 x half> undef, undef
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @vf64() {
|
||||
; CHECK-MVE-LABEL: 'vf64'
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %c2 = fadd <2 x double> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %d2 = fsub <2 x double> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %e2 = fmul <2 x double> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %c4 = fadd <4 x double> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %d4 = fsub <4 x double> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %e4 = fmul <4 x double> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %c8 = fadd <8 x double> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %d8 = fsub <8 x double> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %e8 = fmul <8 x double> undef, undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
; CHECK-MVEFP-LABEL: 'vf64'
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %c2 = fadd <2 x double> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %d2 = fsub <2 x double> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %e2 = fmul <2 x double> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %c4 = fadd <4 x double> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %d4 = fsub <4 x double> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %e4 = fmul <4 x double> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %c8 = fadd <8 x double> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %d8 = fsub <8 x double> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %e8 = fmul <8 x double> undef, undef
|
||||
; CHECK-MVEFP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
%c2 = fadd <2 x double> undef, undef
|
||||
%d2 = fsub <2 x double> undef, undef
|
||||
%e2 = fmul <2 x double> undef, undef
|
||||
%c4 = fadd <4 x double> undef, undef
|
||||
%d4 = fsub <4 x double> undef, undef
|
||||
%e4 = fmul <4 x double> undef, undef
|
||||
%c8 = fadd <8 x double> undef, undef
|
||||
%d8 = fsub <8 x double> undef, undef
|
||||
%e8 = fmul <8 x double> undef, undef
|
||||
ret void
|
||||
}
|
||||
|
|
@ -0,0 +1,278 @@
|
|||
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
|
||||
; RUN: opt -cost-model -analyze -mtriple=thumbv6m-none-eabi < %s | FileCheck %s --check-prefix=CHECK-NOVEC
|
||||
; RUN: opt -cost-model -analyze -mtriple=thumbv7m-none-eabi -mcpu=cortex-m3 < %s | FileCheck %s --check-prefix=CHECK-NOVEC
|
||||
; RUN: opt -cost-model -analyze -mtriple=thumbv7m-none-eabi -mcpu=cortex-m4 < %s | FileCheck %s --check-prefix=CHECK-FP
|
||||
; RUN: opt -cost-model -analyze -mtriple=thumbv8.1-m.main-none-eabi -mattr=+mve < %s | FileCheck %s --check-prefix=CHECK-MVE
|
||||
; RUN: opt -cost-model -analyze -mtriple=thumbv7-apple-ios6.0.0 -mcpu=swift < %s | FileCheck %s --check-prefix=CHECK-NEON
|
||||
; RUN: opt -cost-model -analyze -mtriple=arm-none-eabi -mcpu=cortex-a53 < %s | FileCheck %s --check-prefix=CHECK-NEON
|
||||
|
||||
define void @stores() {
|
||||
; CHECK-NOVEC-LABEL: 'stores'
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 undef, i8* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 undef, i16* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 undef, i32* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i64 undef, i64* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store i128 undef, i128* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store float undef, float* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store double undef, double* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i8> undef, <2 x i8>* undef, align 1
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i16> undef, <2 x i16>* undef, align 2
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i32> undef, <2 x i32>* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <2 x i64> undef, <2 x i64>* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> undef, <4 x i32>* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <8 x i16> undef, <8 x i16>* undef, align 2
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <16 x i8> undef, <16 x i8>* undef, align 1
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x float> undef, <4 x float>* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 32 for instruction: store <4 x double> undef, <4 x double>* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x float> undef, <2 x float>* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <2 x double> undef, <2 x double>* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <2 x i64> undef, <2 x i64>* undef, align 1
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> undef, <4 x i32>* undef, align 1
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <8 x i16> undef, <8 x i16>* undef, align 1
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x float> undef, <4 x float>* undef, align 1
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <2 x double> undef, <2 x double>* undef, align 1
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
; CHECK-FP-LABEL: 'stores'
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 undef, i8* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 undef, i16* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 undef, i32* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i64 undef, i64* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store i128 undef, i128* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store float undef, float* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store double undef, double* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i8> undef, <2 x i8>* undef, align 1
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i16> undef, <2 x i16>* undef, align 2
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x i32> undef, <2 x i32>* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <2 x i64> undef, <2 x i64>* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> undef, <4 x i32>* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <8 x i16> undef, <8 x i16>* undef, align 2
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <16 x i8> undef, <16 x i8>* undef, align 1
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x float> undef, <4 x float>* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 16 for instruction: store <4 x double> undef, <4 x double>* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store <2 x float> undef, <2 x float>* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <2 x double> undef, <2 x double>* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <2 x i64> undef, <2 x i64>* undef, align 1
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x i32> undef, <4 x i32>* undef, align 1
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <8 x i16> undef, <8 x i16>* undef, align 1
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <4 x float> undef, <4 x float>* undef, align 1
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <2 x double> undef, <2 x double>* undef, align 1
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
; CHECK-MVE-LABEL: 'stores'
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 undef, i8* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 undef, i16* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 undef, i32* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i64 undef, i64* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store i128 undef, i128* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store float undef, float* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store double undef, double* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i8> undef, <2 x i8>* undef, align 1
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> undef, <2 x i16>* undef, align 2
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> undef, <2 x i32>* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i64> undef, <2 x i64>* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> undef, <4 x i32>* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> undef, <8 x i16>* undef, align 2
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i8> undef, <16 x i8>* undef, align 1
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x float> undef, <4 x float>* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <4 x double> undef, <4 x double>* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x float> undef, <2 x float>* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <2 x double> undef, <2 x double>* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i64> undef, <2 x i64>* undef, align 1
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> undef, <4 x i32>* undef, align 1
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> undef, <8 x i16>* undef, align 1
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x float> undef, <4 x float>* undef, align 1
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <2 x double> undef, <2 x double>* undef, align 1
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
; CHECK-NEON-LABEL: 'stores'
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i8 undef, i8* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i16 undef, i16* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store i32 undef, i32* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: store i64 undef, i64* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store i128 undef, i128* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store float undef, float* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store double undef, double* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i8> undef, <2 x i8>* undef, align 1
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i16> undef, <2 x i16>* undef, align 2
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i32> undef, <2 x i32>* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i64> undef, <2 x i64>* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> undef, <4 x i32>* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> undef, <8 x i16>* undef, align 2
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <16 x i8> undef, <16 x i8>* undef, align 1
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x float> undef, <4 x float>* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 8 for instruction: store <4 x double> undef, <4 x double>* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x float> undef, <2 x float>* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <2 x double> undef, <2 x double>* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <2 x i64> undef, <2 x i64>* undef, align 1
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x i32> undef, <4 x i32>* undef, align 1
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <8 x i16> undef, <8 x i16>* undef, align 1
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: store <4 x float> undef, <4 x float>* undef, align 1
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: store <2 x double> undef, <2 x double>* undef, align 1
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
store i8 undef, i8* undef, align 4
|
||||
store i16 undef, i16* undef, align 4
|
||||
store i32 undef, i32* undef, align 4
|
||||
store i64 undef, i64* undef, align 4
|
||||
store i128 undef, i128* undef, align 4
|
||||
store float undef, float* undef, align 4
|
||||
store double undef, double* undef, align 4
|
||||
|
||||
store <2 x i8> undef, <2 x i8>* undef, align 1
|
||||
store <2 x i16> undef, <2 x i16>* undef, align 2
|
||||
store <2 x i32> undef, <2 x i32>* undef, align 4
|
||||
store <2 x i64> undef, <2 x i64>* undef, align 4
|
||||
store <4 x i32> undef, <4 x i32>* undef, align 4
|
||||
store <8 x i16> undef, <8 x i16>* undef, align 2
|
||||
store <16 x i8> undef, <16 x i8>* undef, align 1
|
||||
|
||||
store <4 x float> undef, <4 x float>* undef, align 4
|
||||
store <4 x double> undef, <4 x double>* undef, align 4
|
||||
store <2 x float> undef, <2 x float>* undef, align 4
|
||||
store <2 x double> undef, <2 x double>* undef, align 4
|
||||
|
||||
store <2 x i64> undef, <2 x i64>* undef, align 1
|
||||
store <4 x i32> undef, <4 x i32>* undef, align 1
|
||||
store <8 x i16> undef, <8 x i16>* undef, align 1
|
||||
store <4 x float> undef, <4 x float>* undef, align 1
|
||||
store <2 x double> undef, <2 x double>* undef, align 1
|
||||
|
||||
ret void
|
||||
}
|
||||
|
||||
define void @loads() {
|
||||
; CHECK-NOVEC-LABEL: 'loads'
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i8, i8* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load i16, i16* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load i32, i32* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = load i64, i64* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = load i128, i128* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load float, float* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %7 = load double, double* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = load <2 x i8>, <2 x i8>* undef, align 1
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = load <2 x i16>, <2 x i16>* undef, align 2
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %10 = load <2 x i32>, <2 x i32>* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %11 = load <2 x i64>, <2 x i64>* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %12 = load <4 x i32>, <4 x i32>* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %13 = load <8 x i16>, <8 x i16>* undef, align 2
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %14 = load <16 x i8>, <16 x i8>* undef, align 1
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %15 = load <4 x float>, <4 x float>* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %16 = load <4 x double>, <4 x double>* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = load <2 x float>, <2 x float>* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %18 = load <2 x double>, <2 x double>* undef, align 4
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %19 = load <2 x i64>, <2 x i64>* undef, align 1
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %20 = load <4 x i32>, <4 x i32>* undef, align 1
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %21 = load <8 x i16>, <8 x i16>* undef, align 1
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %22 = load <4 x float>, <4 x float>* undef, align 1
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %23 = load <2 x double>, <2 x double>* undef, align 1
|
||||
; CHECK-NOVEC-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
; CHECK-FP-LABEL: 'loads'
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i8, i8* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load i16, i16* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load i32, i32* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = load i64, i64* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = load i128, i128* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load float, float* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load double, double* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %8 = load <2 x i8>, <2 x i8>* undef, align 1
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %9 = load <2 x i16>, <2 x i16>* undef, align 2
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %10 = load <2 x i32>, <2 x i32>* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %11 = load <2 x i64>, <2 x i64>* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %12 = load <4 x i32>, <4 x i32>* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %13 = load <8 x i16>, <8 x i16>* undef, align 2
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %14 = load <16 x i8>, <16 x i8>* undef, align 1
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %15 = load <4 x float>, <4 x float>* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 16 for instruction: %16 = load <4 x double>, <4 x double>* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %17 = load <2 x float>, <2 x float>* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %18 = load <2 x double>, <2 x double>* undef, align 4
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %19 = load <2 x i64>, <2 x i64>* undef, align 1
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %20 = load <4 x i32>, <4 x i32>* undef, align 1
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %21 = load <8 x i16>, <8 x i16>* undef, align 1
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %22 = load <4 x float>, <4 x float>* undef, align 1
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %23 = load <2 x double>, <2 x double>* undef, align 1
|
||||
; CHECK-FP-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
; CHECK-MVE-LABEL: 'loads'
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i8, i8* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load i16, i16* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load i32, i32* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = load i64, i64* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = load i128, i128* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load float, float* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load double, double* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <2 x i8>, <2 x i8>* undef, align 1
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load <2 x i16>, <2 x i16>* undef, align 2
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <2 x i32>, <2 x i32>* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = load <2 x i64>, <2 x i64>* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <4 x i32>, <4 x i32>* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = load <8 x i16>, <8 x i16>* undef, align 2
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <16 x i8>, <16 x i8>* undef, align 1
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = load <4 x float>, <4 x float>* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %16 = load <4 x double>, <4 x double>* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = load <2 x float>, <2 x float>* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %18 = load <2 x double>, <2 x double>* undef, align 4
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = load <2 x i64>, <2 x i64>* undef, align 1
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %20 = load <4 x i32>, <4 x i32>* undef, align 1
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %21 = load <8 x i16>, <8 x i16>* undef, align 1
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %22 = load <4 x float>, <4 x float>* undef, align 1
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %23 = load <2 x double>, <2 x double>* undef, align 1
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
; CHECK-NEON-LABEL: 'loads'
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %1 = load i8, i8* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %2 = load i16, i16* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %3 = load i32, i32* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %4 = load i64, i64* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %5 = load i128, i128* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %6 = load float, float* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %7 = load double, double* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %8 = load <2 x i8>, <2 x i8>* undef, align 1
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %9 = load <2 x i16>, <2 x i16>* undef, align 2
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %10 = load <2 x i32>, <2 x i32>* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %11 = load <2 x i64>, <2 x i64>* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %12 = load <4 x i32>, <4 x i32>* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %13 = load <8 x i16>, <8 x i16>* undef, align 2
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %14 = load <16 x i8>, <16 x i8>* undef, align 1
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %15 = load <4 x float>, <4 x float>* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %16 = load <4 x double>, <4 x double>* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %17 = load <2 x float>, <2 x float>* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %18 = load <2 x double>, <2 x double>* undef, align 4
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %19 = load <2 x i64>, <2 x i64>* undef, align 1
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %20 = load <4 x i32>, <4 x i32>* undef, align 1
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %21 = load <8 x i16>, <8 x i16>* undef, align 1
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %22 = load <4 x float>, <4 x float>* undef, align 1
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %23 = load <2 x double>, <2 x double>* undef, align 1
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
load i8, i8* undef, align 4
|
||||
load i16, i16* undef, align 4
|
||||
load i32, i32* undef, align 4
|
||||
load i64, i64* undef, align 4
|
||||
load i128, i128* undef, align 4
|
||||
load float, float* undef, align 4
|
||||
load double, double* undef, align 4
|
||||
|
||||
load <2 x i8>, <2 x i8>* undef, align 1
|
||||
load <2 x i16>, <2 x i16>* undef, align 2
|
||||
load <2 x i32>, <2 x i32>* undef, align 4
|
||||
load <2 x i64>, <2 x i64>* undef, align 4
|
||||
load <4 x i32>, <4 x i32>* undef, align 4
|
||||
load <8 x i16>, <8 x i16>* undef, align 2
|
||||
load <16 x i8>, <16 x i8>* undef, align 1
|
||||
|
||||
load <4 x float>, <4 x float>* undef, align 4
|
||||
load <4 x double>, <4 x double>* undef, align 4
|
||||
load <2 x float>, <2 x float>* undef, align 4
|
||||
load <2 x double>, <2 x double>* undef, align 4
|
||||
|
||||
load <2 x i64>, <2 x i64>* undef, align 1
|
||||
load <4 x i32>, <4 x i32>* undef, align 1
|
||||
load <8 x i16>, <8 x i16>* undef, align 1
|
||||
load <4 x float>, <4 x float>* undef, align 1
|
||||
load <2 x double>, <2 x double>* undef, align 1
|
||||
|
||||
ret void
|
||||
}
|
||||
|
|
@ -1,74 +1,107 @@
|
|||
; RUN: opt < %s -cost-model -analyze -mtriple=thumbv7-apple-ios6.0.0 -mcpu=swift | FileCheck %s
|
||||
target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32-S32"
|
||||
target triple = "thumbv7-apple-ios6.0.0"
|
||||
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
|
||||
; RUN: opt < %s -cost-model -analyze -mtriple=thumbv8.1-m.main-none-eabi -mattr=+mve.fp | FileCheck %s --check-prefix=CHECK-MVE
|
||||
; RUN: opt < %s -cost-model -analyze -mtriple=thumbv7-apple-ios6.0.0 -mcpu=swift | FileCheck %s --check-prefix=CHECK-NEON
|
||||
|
||||
; CHECK: casts
|
||||
define void @casts() {
|
||||
; Scalar values
|
||||
; CHECK: cost of 1 {{.*}} select
|
||||
; CHECK-MVE-LABEL: 'casts'
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v1 = select i1 undef, i8 undef, i8 undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2 = select i1 undef, i16 undef, i16 undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3 = select i1 undef, i32 undef, i32 undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4 = select i1 undef, i64 undef, i64 undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5 = select i1 undef, float undef, float undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v6 = select i1 undef, double undef, double undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v7 = select <2 x i1> undef, <2 x i8> undef, <2 x i8> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8 = select <4 x i1> undef, <4 x i8> undef, <4 x i8> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v9 = select <8 x i1> undef, <8 x i8> undef, <8 x i8> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v10 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v11 = select <2 x i1> undef, <2 x i16> undef, <2 x i16> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v12 = select <4 x i1> undef, <4 x i16> undef, <4 x i16> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v13 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v13b = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 8 for instruction: %v14 = select <2 x i1> undef, <2 x i32> undef, <2 x i32> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v15 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v15b = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v15c = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %v16 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 20 for instruction: %v16a = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %v16b = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 80 for instruction: %v16c = select <16 x i1> undef, <16 x i64> undef, <16 x i64> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v17 = select <2 x i1> undef, <2 x float> undef, <2 x float> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v18 = select <4 x i1> undef, <4 x float> undef, <4 x float> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v19 = select <2 x i1> undef, <2 x double> undef, <2 x double> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v20 = select <1 x i1> undef, <1 x i32> undef, <1 x i32> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v21 = select <3 x i1> undef, <3 x float> undef, <3 x float> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 10 for instruction: %v22 = select <5 x i1> undef, <5 x double> undef, <5 x double> undef
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
; CHECK-NEON-LABEL: 'casts'
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v1 = select i1 undef, i8 undef, i8 undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v2 = select i1 undef, i16 undef, i16 undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v3 = select i1 undef, i32 undef, i32 undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v4 = select i1 undef, i64 undef, i64 undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v5 = select i1 undef, float undef, float undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v6 = select i1 undef, double undef, double undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7 = select <2 x i1> undef, <2 x i8> undef, <2 x i8> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8 = select <4 x i1> undef, <4 x i8> undef, <4 x i8> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v9 = select <8 x i1> undef, <8 x i8> undef, <8 x i8> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v10 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v11 = select <2 x i1> undef, <2 x i16> undef, <2 x i16> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v12 = select <4 x i1> undef, <4 x i16> undef, <4 x i16> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v13 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v13b = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v14 = select <2 x i1> undef, <2 x i32> undef, <2 x i32> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v15 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v15b = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v15c = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 19 for instruction: %v16a = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 50 for instruction: %v16b = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 100 for instruction: %v16c = select <16 x i1> undef, <16 x i64> undef, <16 x i64> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v17 = select <2 x i1> undef, <2 x float> undef, <2 x float> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v18 = select <4 x i1> undef, <4 x float> undef, <4 x float> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v19 = select <2 x i1> undef, <2 x double> undef, <2 x double> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v20 = select <1 x i1> undef, <1 x i32> undef, <1 x i32> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v21 = select <3 x i1> undef, <3 x float> undef, <3 x float> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 4 for instruction: %v22 = select <5 x i1> undef, <5 x double> undef, <5 x double> undef
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
; Scalar values
|
||||
%v1 = select i1 undef, i8 undef, i8 undef
|
||||
; CHECK: cost of 1 {{.*}} select
|
||||
%v2 = select i1 undef, i16 undef, i16 undef
|
||||
; CHECK: cost of 1 {{.*}} select
|
||||
%v3 = select i1 undef, i32 undef, i32 undef
|
||||
; CHECK: cost of 2 {{.*}} select
|
||||
%v4 = select i1 undef, i64 undef, i64 undef
|
||||
; CHECK: cost of 1 {{.*}} select
|
||||
%v5 = select i1 undef, float undef, float undef
|
||||
; CHECK: cost of 1 {{.*}} select
|
||||
%v6 = select i1 undef, double undef, double undef
|
||||
|
||||
; Vector values
|
||||
; CHECK: cost of 1 {{.*}} select
|
||||
; Vector values
|
||||
%v7 = select <2 x i1> undef, <2 x i8> undef, <2 x i8> undef
|
||||
; CHECK: cost of 1 {{.*}} select
|
||||
%v8 = select <4 x i1> undef, <4 x i8> undef, <4 x i8> undef
|
||||
; CHECK: cost of 1 {{.*}} select
|
||||
%v9 = select <8 x i1> undef, <8 x i8> undef, <8 x i8> undef
|
||||
; CHECK: cost of 1 {{.*}} select
|
||||
%v10 = select <16 x i1> undef, <16 x i8> undef, <16 x i8> undef
|
||||
|
||||
; CHECK: cost of 1 {{.*}} select
|
||||
%v11 = select <2 x i1> undef, <2 x i16> undef, <2 x i16> undef
|
||||
; CHECK: cost of 1 {{.*}} select
|
||||
%v12 = select <4 x i1> undef, <4 x i16> undef, <4 x i16> undef
|
||||
; CHECK: cost of 1 {{.*}} select
|
||||
%v13 = select <8 x i1> undef, <8 x i16> undef, <8 x i16> undef
|
||||
; CHECK: cost of 2 {{.*}} select
|
||||
%v13b = select <16 x i1> undef, <16 x i16> undef, <16 x i16> undef
|
||||
|
||||
; CHECK: cost of 1 {{.*}} select
|
||||
%v14 = select <2 x i1> undef, <2 x i32> undef, <2 x i32> undef
|
||||
; CHECK: cost of 1 {{.*}} select
|
||||
%v15 = select <4 x i1> undef, <4 x i32> undef, <4 x i32> undef
|
||||
; CHECK: cost of 2 {{.*}} select
|
||||
%v15b = select <8 x i1> undef, <8 x i32> undef, <8 x i32> undef
|
||||
; CHECK: cost of 4 {{.*}} select
|
||||
%v15c = select <16 x i1> undef, <16 x i32> undef, <16 x i32> undef
|
||||
|
||||
; CHECK: cost of 1 {{.*}} select
|
||||
%v16 = select <2 x i1> undef, <2 x i64> undef, <2 x i64> undef
|
||||
; CHECK: cost of 19 {{.*}} select
|
||||
%v16a = select <4 x i1> undef, <4 x i64> undef, <4 x i64> undef
|
||||
; CHECK: cost of 50 {{.*}} select
|
||||
%v16b = select <8 x i1> undef, <8 x i64> undef, <8 x i64> undef
|
||||
; CHECK: cost of 100 {{.*}} select
|
||||
%v16c = select <16 x i1> undef, <16 x i64> undef, <16 x i64> undef
|
||||
|
||||
; CHECK: cost of 1 {{.*}} select
|
||||
%v17 = select <2 x i1> undef, <2 x float> undef, <2 x float> undef
|
||||
; CHECK: cost of 1 {{.*}} select
|
||||
%v18 = select <4 x i1> undef, <4 x float> undef, <4 x float> undef
|
||||
|
||||
; CHECK: cost of 1 {{.*}} select
|
||||
%v19 = select <2 x i1> undef, <2 x double> undef, <2 x double> undef
|
||||
|
||||
; odd vectors get legalized and should have similar costs
|
||||
; CHECK: cost of 1 {{.*}} select
|
||||
%v20 = select <1 x i1> undef, <1 x i32> undef, <1 x i32> undef
|
||||
; CHECK: cost of 1 {{.*}} select
|
||||
%v21 = select <3 x i1> undef, <3 x float> undef, <3 x float> undef
|
||||
; CHECK: cost of 4 {{.*}} select
|
||||
%v22 = select <5 x i1> undef, <5 x double> undef, <5 x double> undef
|
||||
|
||||
ret void
|
||||
|
|
|
@ -1,71 +1,104 @@
|
|||
; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py
|
||||
; RUN: opt < %s -cost-model -analyze -mtriple=thumbv7-apple-ios6.0.0 -mcpu=swift | FileCheck %s
|
||||
target datalayout = "e-p:32:32:32-i1:8:32-i8:8:32-i16:16:32-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:32:64-v128:32:128-a0:0:32-n32-S32"
|
||||
target triple = "thumbv7-apple-ios6.0.0"
|
||||
; RUN: opt < %s -cost-model -analyze -mtriple=thumbv8.1-m.main-none-eabi -mattr=+mve.fp | FileCheck %s --check-prefix=CHECK-MVE
|
||||
; RUN: opt < %s -cost-model -analyze -mtriple=thumbv7-apple-ios6.0.0 -mcpu=swift | FileCheck %s --check-prefix=CHECK-NEON
|
||||
|
||||
define void @broadcast() {
|
||||
; CHECK-LABEL: 'broadcast'
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7 = shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> zeroinitializer
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> zeroinitializer
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v9 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> zeroinitializer
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v10 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> zeroinitializer
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v11 = shufflevector <2 x i16> undef, <2 x i16> undef, <2 x i32> zeroinitializer
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v12 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> zeroinitializer
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v13 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> zeroinitializer
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v14 = shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> zeroinitializer
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v15 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> zeroinitializer
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16 = shufflevector <2 x float> undef, <2 x float> undef, <2 x i32> zeroinitializer
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v17 = shufflevector <4 x float> undef, <4 x float> undef, <4 x i32> zeroinitializer
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
; CHECK-MVE-LABEL: 'broadcast'
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7 = shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> zeroinitializer
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> zeroinitializer
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v9 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> zeroinitializer
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v10 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> zeroinitializer
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v11 = shufflevector <2 x i16> undef, <2 x i16> undef, <2 x i32> zeroinitializer
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v12 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> zeroinitializer
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v13 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> zeroinitializer
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v14 = shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> zeroinitializer
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v15 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> zeroinitializer
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16 = shufflevector <2 x float> undef, <2 x float> undef, <2 x i32> zeroinitializer
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v17 = shufflevector <4 x float> undef, <4 x float> undef, <4 x i32> zeroinitializer
|
||||
; CHECK-MVE-NEXT: Cost Model: Unknown cost for instruction: %v18 = shufflevector <8 x half> undef, <8 x half> undef, <4 x i32> zeroinitializer
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
%v7 = shufflevector <2 x i8> undef, <2 x i8>undef, <2 x i32> zeroinitializer
|
||||
%v8 = shufflevector <4 x i8> undef, <4 x i8>undef, <4 x i32> zeroinitializer
|
||||
%v9 = shufflevector <8 x i8> undef, <8 x i8>undef, <8 x i32> zeroinitializer
|
||||
%v10 = shufflevector <16 x i8> undef, <16 x i8>undef, <16 x i32> zeroinitializer
|
||||
; CHECK-NEON-LABEL: 'broadcast'
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7 = shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> zeroinitializer
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> zeroinitializer
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v9 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> zeroinitializer
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v10 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> zeroinitializer
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v11 = shufflevector <2 x i16> undef, <2 x i16> undef, <2 x i32> zeroinitializer
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v12 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> zeroinitializer
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v13 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> zeroinitializer
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v14 = shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> zeroinitializer
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v15 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> zeroinitializer
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16 = shufflevector <2 x float> undef, <2 x float> undef, <2 x i32> zeroinitializer
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v17 = shufflevector <4 x float> undef, <4 x float> undef, <4 x i32> zeroinitializer
|
||||
; CHECK-NEON-NEXT: Cost Model: Unknown cost for instruction: %v18 = shufflevector <8 x half> undef, <8 x half> undef, <4 x i32> zeroinitializer
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
%v7 = shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> zeroinitializer
|
||||
%v8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> zeroinitializer
|
||||
%v9 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> zeroinitializer
|
||||
%v10 = shufflevector <16 x i8> undef, <16 x i8> undef, <16 x i32> zeroinitializer
|
||||
|
||||
%v11 = shufflevector <2 x i16> undef, <2 x i16>undef, <2 x i32> zeroinitializer
|
||||
%v12 = shufflevector <4 x i16> undef, <4 x i16>undef, <4 x i32> zeroinitializer
|
||||
%v13 = shufflevector <8 x i16> undef, <8 x i16>undef, <8 x i32> zeroinitializer
|
||||
%v11 = shufflevector <2 x i16> undef, <2 x i16> undef, <2 x i32> zeroinitializer
|
||||
%v12 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> zeroinitializer
|
||||
%v13 = shufflevector <8 x i16> undef, <8 x i16> undef, <8 x i32> zeroinitializer
|
||||
|
||||
%v14 = shufflevector <2 x i32> undef, <2 x i32>undef, <2 x i32> zeroinitializer
|
||||
%v15 = shufflevector <4 x i32> undef, <4 x i32>undef, <4 x i32> zeroinitializer
|
||||
%v14 = shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> zeroinitializer
|
||||
%v15 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> zeroinitializer
|
||||
|
||||
%v16 = shufflevector <2 x float> undef, <2 x float>undef, <2 x i32> zeroinitializer
|
||||
%v17 = shufflevector <4 x float> undef, <4 x float>undef, <4 x i32> zeroinitializer
|
||||
%v16 = shufflevector <2 x float> undef, <2 x float> undef, <2 x i32> zeroinitializer
|
||||
%v17 = shufflevector <4 x float> undef, <4 x float> undef, <4 x i32> zeroinitializer
|
||||
%v18 = shufflevector <8 x half> undef, <8 x half> undef, <4 x i32> zeroinitializer
|
||||
|
||||
ret void
|
||||
}
|
||||
|
||||
;; Reverse shuffles should be lowered to vrev and possibly a vext (for quadwords)
|
||||
;; Reverse shuffles should be lowered to vrev and possibly a vext (for quadwords, on neon)
|
||||
define void @reverse() {
|
||||
; CHECK-LABEL: 'reverse'
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7 = shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> <i32 1, i32 0>
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v9 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v10 = 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-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v11 = shufflevector <2 x i16> undef, <2 x i16> undef, <2 x i32> <i32 1, i32 0>
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v12 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v13 = 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-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v14 = shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> <i32 1, i32 0>
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v15 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16 = shufflevector <2 x float> undef, <2 x float> undef, <2 x i32> <i32 1, i32 0>
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v17 = shufflevector <4 x float> undef, <4 x float> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
|
||||
; CHECK-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
; CHECK-MVE-LABEL: 'reverse'
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7 = shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> <i32 1, i32 0>
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v9 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v10 = 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-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v11 = shufflevector <2 x i16> undef, <2 x i16> undef, <2 x i32> <i32 1, i32 0>
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v12 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v13 = 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-MVE-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v14 = shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> <i32 1, i32 0>
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v15 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v16 = shufflevector <2 x float> undef, <2 x float> undef, <2 x i32> <i32 1, i32 0>
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v17 = shufflevector <4 x float> undef, <4 x float> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 32 for instruction: %v18 = shufflevector <8 x half> undef, <8 x half> undef, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
|
||||
; CHECK-MVE-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
%v7 = shufflevector <2 x i8> undef, <2 x i8>undef, <2 x i32> <i32 1, i32 0>
|
||||
%v8 = shufflevector <4 x i8> undef, <4 x i8>undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
|
||||
%v9 = shufflevector <8 x i8> undef, <8 x i8>undef, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
|
||||
%v10 = 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-NEON-LABEL: 'reverse'
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v7 = shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> <i32 1, i32 0>
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v9 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v10 = 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v11 = shufflevector <2 x i16> undef, <2 x i16> undef, <2 x i32> <i32 1, i32 0>
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v12 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v13 = 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-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v14 = shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> <i32 1, i32 0>
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v15 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 1 for instruction: %v16 = shufflevector <2 x float> undef, <2 x float> undef, <2 x i32> <i32 1, i32 0>
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 2 for instruction: %v17 = shufflevector <4 x float> undef, <4 x float> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 40 for instruction: %v18 = shufflevector <8 x half> undef, <8 x half> undef, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
|
||||
; CHECK-NEON-NEXT: Cost Model: Found an estimated cost of 0 for instruction: ret void
|
||||
;
|
||||
%v7 = shufflevector <2 x i8> undef, <2 x i8> undef, <2 x i32> <i32 1, i32 0>
|
||||
%v8 = shufflevector <4 x i8> undef, <4 x i8> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
|
||||
%v9 = shufflevector <8 x i8> undef, <8 x i8> undef, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
|
||||
%v10 = 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>
|
||||
|
||||
%v11 = shufflevector <2 x i16> undef, <2 x i16>undef, <2 x i32> <i32 1, i32 0>
|
||||
%v12 = shufflevector <4 x i16> undef, <4 x i16>undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
|
||||
%v13 = 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>
|
||||
%v11 = shufflevector <2 x i16> undef, <2 x i16> undef, <2 x i32> <i32 1, i32 0>
|
||||
%v12 = shufflevector <4 x i16> undef, <4 x i16> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
|
||||
%v13 = 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>
|
||||
|
||||
%v14 = shufflevector <2 x i32> undef, <2 x i32>undef, <2 x i32> <i32 1, i32 0>
|
||||
%v15 = shufflevector <4 x i32> undef, <4 x i32>undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
|
||||
%v14 = shufflevector <2 x i32> undef, <2 x i32> undef, <2 x i32> <i32 1, i32 0>
|
||||
%v15 = shufflevector <4 x i32> undef, <4 x i32> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
|
||||
|
||||
%v16 = shufflevector <2 x float> undef, <2 x float>undef, <2 x i32> <i32 1, i32 0>
|
||||
%v17 = shufflevector <4 x float> undef, <4 x float>undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
|
||||
%v16 = shufflevector <2 x float> undef, <2 x float> undef, <2 x i32> <i32 1, i32 0>
|
||||
%v17 = shufflevector <4 x float> undef, <4 x float> undef, <4 x i32> <i32 3, i32 2, i32 1, i32 0>
|
||||
%v18 = shufflevector <8 x half> undef, <8 x half> undef, <8 x i32> <i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
|
||||
|
||||
ret void
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue