diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-08-19 17:39:00 +0000 |
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2016-08-19 17:39:00 +0000 |
| commit | e309d2d0c3d28e79fe61a9c65be2eeb424d328a1 (patch) | |
| tree | 1d50f808cb92f34ffb94c196baa5d25196f64cdb | |
| parent | e38e79c3e69f8df848ca8edbfede36b3df712417 (diff) | |
| download | bcm5719-llvm-e309d2d0c3d28e79fe61a9c65be2eeb424d328a1.tar.gz bcm5719-llvm-e309d2d0c3d28e79fe61a9c65be2eeb424d328a1.zip | |
[CostModel][X86] Add fdiv + frem cost tests
llvm-svn: 279283
| -rw-r--r-- | llvm/test/Analysis/CostModel/X86/arith.ll | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/llvm/test/Analysis/CostModel/X86/arith.ll b/llvm/test/Analysis/CostModel/X86/arith.ll index a35db9c68ff..8d436d2c577 100644 --- a/llvm/test/Analysis/CostModel/X86/arith.ll +++ b/llvm/test/Analysis/CostModel/X86/arith.ll @@ -15,7 +15,7 @@ define i32 @add(i32 %arg) { %A = add <4 x i32> undef, undef ; SSSE3: cost of 2 {{.*}} %B = add ; SSE42: cost of 2 {{.*}} %B = add - ; AVX: cost of 4 {{.*}} %B = add + ; AVX: cost of 4 {{.*}} %B = add ; AVX2: cost of 1 {{.*}} %B = add %B = add <8 x i32> undef, undef ; SSSE3: cost of 1 {{.*}} %C = add @@ -75,7 +75,7 @@ define void @mul() { ; SSE42: cost of 1 {{.*}} %A1 = mul ; AVX: cost of 1 {{.*}} %A1 = mul ; AVX2: cost of 1 {{.*}} %A1 = mul - %A1 = mul <4 x i32> undef, undef + %A1 = mul <4 x i32> undef, undef ; SSSE3: cost of 9 {{.*}} %A2 = mul ; SSE42: cost of 9 {{.*}} %A2 = mul ; AVX: cost of 9 {{.*}} %A2 = mul @@ -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 |

