[CostModel][X86] Add fdiv + frem cost tests

llvm-svn: 279283
This commit is contained in:
Simon Pilgrim 2016-08-19 17:39:00 +00:00
parent e38e79c3e6
commit e309d2d0c3
1 changed files with 32 additions and 2 deletions

View File

@ -104,6 +104,36 @@ define i32 @fmul(i32 %arg) {
ret i32 undef
}
; CHECK-LABEL: 'fdiv'
define i32 @fdiv(i32 %arg) {
; SSSE3: cost of 2 {{.*}} %A = fdiv
; SSE42: cost of 2 {{.*}} %A = fdiv
; AVX: cost of 2 {{.*}} %A = fdiv
; AVX2: cost of 2 {{.*}} %A = fdiv
%A = fdiv <4 x float> undef, undef
; SSSE3: cost of 4 {{.*}} %B = fdiv
; SSE42: cost of 4 {{.*}} %B = fdiv
; AVX: cost of 2 {{.*}} %B = fdiv
; AVX2: cost of 2 {{.*}} %B = fdiv
%B = fdiv <8 x float> undef, undef
ret i32 undef
}
; CHECK-LABEL: 'frem'
define i32 @frem(i32 %arg) {
; SSSE3: cost of 14 {{.*}} %A = frem
; SSE42: cost of 14 {{.*}} %A = frem
; AVX: cost of 14 {{.*}} %A = frem
; AVX2: cost of 14 {{.*}} %A = frem
%A = frem <4 x float> undef, undef
; SSSE3: cost of 28 {{.*}} %B = frem
; SSE42: cost of 28 {{.*}} %B = frem
; AVX: cost of 30 {{.*}} %B = frem
; AVX2: cost of 30 {{.*}} %B = frem
%B = frem <8 x float> undef, undef
ret i32 undef
}
; CHECK-LABEL: 'shift'
define void @shift() {
; SSSE3: cost of 10 {{.*}} %A0 = shl