~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/Analysis/CostModel/X86/div.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: opt -mtriple=x86_64-apple-darwin -mcpu=core2 -cost-model -analyze < %s | FileCheck --check-prefix=SSE2 %s
 
2
; RUN: opt -mtriple=x86_64-apple-darwin -mcpu=core-avx2 -cost-model -analyze < %s | FileCheck --check-prefix=AVX2 %s
 
3
 
 
4
 
 
5
define void @div_sse() {
 
6
  ; SSE2: div_sse
 
7
  ; SSE2: cost of 320 {{.*}} sdiv
 
8
  %a0 = sdiv <16 x i8> undef, undef
 
9
  ; SSE2: cost of 160 {{.*}} sdiv
 
10
  %a1 = sdiv <8 x i16> undef, undef
 
11
  ; SSE2: cost of 80 {{.*}} sdiv
 
12
  %a2 = sdiv <4 x i32> undef, undef
 
13
  ; SSE2: cost of 40 {{.*}} sdiv
 
14
  %a3 = sdiv <2 x i32> undef, undef
 
15
  ret void
 
16
}
 
17
; SSE2: div_avx
 
18
 
 
19
define void @div_avx() {
 
20
  ; AVX2: div_avx
 
21
  ; AVX2: cost of 640 {{.*}} sdiv
 
22
  %a0 = sdiv <32 x i8> undef, undef
 
23
  ; AVX2: cost of 320 {{.*}} sdiv
 
24
  %a1 = sdiv <16 x i16> undef, undef
 
25
  ; AVX2: cost of 160 {{.*}} sdiv
 
26
  %a2 = sdiv <8 x i32> undef, undef
 
27
  ; AVX2: cost of 80 {{.*}} sdiv
 
28
  %a3 = sdiv <4 x i32> undef, undef
 
29
  ret void
 
30
}
 
31
 
 
32