• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
5define 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
19define 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
33