metadata.ll 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
  2. ; RUN: opt < %s -bb-vectorize -bb-vectorize-req-chain-depth=3 -S | FileCheck %s
  3. ; Simple 3-pair chain with loads and stores (with fpmath)
  4. define void @test1(double* %a, double* %b, double* %c) nounwind uwtable readonly {
  5. entry:
  6. %i0 = load double, double* %a, align 8
  7. %i1 = load double, double* %b, align 8
  8. %mul = fmul double %i0, %i1, !fpmath !2
  9. %arrayidx3 = getelementptr inbounds double, double* %a, i64 1
  10. %i3 = load double, double* %arrayidx3, align 8
  11. %arrayidx4 = getelementptr inbounds double, double* %b, i64 1
  12. %i4 = load double, double* %arrayidx4, align 8
  13. %mul5 = fmul double %i3, %i4, !fpmath !3
  14. store double %mul, double* %c, align 8
  15. %arrayidx5 = getelementptr inbounds double, double* %c, i64 1
  16. store double %mul5, double* %arrayidx5, align 8
  17. ret void
  18. ; CHECK-LABEL: @test1(
  19. ; CHECK: !fpmath
  20. ; CHECK: ret void
  21. }
  22. ; Simple 3-pair chain with loads and stores (ints with range)
  23. define void @test2(i64* %a, i64* %b, i64* %c) nounwind uwtable readonly {
  24. entry:
  25. %i0 = load i64, i64* %a, align 8, !range !0
  26. %i1 = load i64, i64* %b, align 8
  27. %mul = mul i64 %i0, %i1
  28. %arrayidx3 = getelementptr inbounds i64, i64* %a, i64 1
  29. %i3 = load i64, i64* %arrayidx3, align 8, !range !1
  30. %arrayidx4 = getelementptr inbounds i64, i64* %b, i64 1
  31. %i4 = load i64, i64* %arrayidx4, align 8
  32. %mul5 = mul i64 %i3, %i4
  33. store i64 %mul, i64* %c, align 8
  34. %arrayidx5 = getelementptr inbounds i64, i64* %c, i64 1
  35. store i64 %mul5, i64* %arrayidx5, align 8
  36. ret void
  37. ; CHECK-LABEL: @test2(
  38. ; CHECK-NOT: !range
  39. ; CHECK: ret void
  40. }
  41. !0 = !{i64 0, i64 2}
  42. !1 = !{i64 3, i64 5}
  43. !2 = !{ float 5.0 }
  44. !3 = !{ float 2.5 }