div.ll 921 B

1234567891011121314151617181920212223242526272829303132
  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. define void @div_sse() {
  4. ; SSE2: div_sse
  5. ; SSE2: cost of 320 {{.*}} sdiv
  6. %a0 = sdiv <16 x i8> undef, undef
  7. ; SSE2: cost of 160 {{.*}} sdiv
  8. %a1 = sdiv <8 x i16> undef, undef
  9. ; SSE2: cost of 80 {{.*}} sdiv
  10. %a2 = sdiv <4 x i32> undef, undef
  11. ; SSE2: cost of 40 {{.*}} sdiv
  12. %a3 = sdiv <2 x i32> undef, undef
  13. ret void
  14. }
  15. ; SSE2: div_avx
  16. define void @div_avx() {
  17. ; AVX2: div_avx
  18. ; AVX2: cost of 640 {{.*}} sdiv
  19. %a0 = sdiv <32 x i8> undef, undef
  20. ; AVX2: cost of 320 {{.*}} sdiv
  21. %a1 = sdiv <16 x i16> undef, undef
  22. ; AVX2: cost of 160 {{.*}} sdiv
  23. %a2 = sdiv <8 x i32> undef, undef
  24. ; AVX2: cost of 80 {{.*}} sdiv
  25. %a3 = sdiv <4 x i32> undef, undef
  26. ret void
  27. }