metadata.ll 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ; RUN: opt < %s -loop-vectorize -force-vector-interleave=1 -force-vector-width=4 -S | FileCheck %s
  2. target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
  3. target triple = "x86_64-unknown-linux-gnu"
  4. ; Function Attrs: nounwind uwtable
  5. define i32 @test1(i32* nocapture %a, float* nocapture readonly %b) #0 {
  6. entry:
  7. br label %for.body
  8. for.body: ; preds = %for.body, %entry
  9. %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]
  10. %arrayidx = getelementptr inbounds float, float* %b, i64 %indvars.iv
  11. %0 = load float, float* %arrayidx, align 4, !tbaa !0
  12. %conv = fptosi float %0 to i32
  13. %arrayidx2 = getelementptr inbounds i32, i32* %a, i64 %indvars.iv
  14. store i32 %conv, i32* %arrayidx2, align 4, !tbaa !4
  15. %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1
  16. %exitcond = icmp eq i64 %indvars.iv.next, 1600
  17. br i1 %exitcond, label %for.end, label %for.body
  18. for.end: ; preds = %for.body
  19. ret i32 0
  20. }
  21. ; CHECK-LABEL: @test1
  22. ; CHECK: load <4 x float>, <4 x float>* %{{.*}}, align 4, !tbaa ![[TFLT:[0-9]+]]
  23. ; CHECK: store <4 x i32> %{{.*}}, <4 x i32>* %{{.*}}, align 4, !tbaa ![[TINT:[0-9]+]]
  24. ; CHECK: ret i32 0
  25. ; CHECK-DAG: ![[TFLT]] = !{![[TFLT1:[0-9]+]]
  26. ; CHECK-DAG: ![[TFLT1]] = !{!"float"
  27. ; CHECK-DAG: ![[TINT]] = !{![[TINT1:[0-9]+]]
  28. ; CHECK-DAG: ![[TINT1]] = !{!"int"
  29. attributes #0 = { nounwind uwtable }
  30. !0 = !{!1, !1, i64 0}
  31. !1 = !{!"float", !2, i64 0}
  32. !2 = !{!"omnipotent char", !3, i64 0}
  33. !3 = !{!"Simple C/C++ TBAA"}
  34. !4 = !{!5, !5, i64 0}
  35. !5 = !{!"int", !2, i64 0}