RTSA-lab01-CacheAnalysis/test/ns.ll

134 lines
17 KiB
LLVM
Raw Permalink Normal View History

2022-04-19 10:56:42 +02:00
; ModuleID = 'ns.c'
source_filename = "ns.c"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-pc-linux-gnu"
@keys = dso_local local_unnamed_addr global [5 x [5 x [5 x [5 x i32]]]] [[5 x [5 x [5 x i32]]] zeroinitializer, [5 x [5 x [5 x i32]]] [[5 x [5 x i32]] [[5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1], [5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1], [5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1], [5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1], [5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1]], [5 x [5 x i32]] [[5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1], [5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1], [5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1], [5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1], [5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1]], [5 x [5 x i32]] [[5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1], [5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1], [5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1], [5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1], [5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1]], [5 x [5 x i32]] [[5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1], [5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1], [5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1], [5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1], [5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1]], [5 x [5 x i32]] [[5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1], [5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1], [5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1], [5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1], [5 x i32] [i32 1, i32 1, i32 1, i32 1, i32 1]]], [5 x [5 x [5 x i32]]] [[5 x [5 x i32]] [[5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2], [5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2], [5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2], [5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2], [5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2]], [5 x [5 x i32]] [[5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2], [5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2], [5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2], [5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2], [5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2]], [5 x [5 x i32]] [[5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2], [5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2], [5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2], [5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2], [5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2]], [5 x [5 x i32]] [[5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2], [5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2], [5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2], [5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2], [5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2]], [5 x [5 x i32]] [[5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2], [5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2], [5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2], [5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2], [5 x i32] [i32 2, i32 2, i32 2, i32 2, i32 2]]], [5 x [5 x [5 x i32]]] [[5 x [5 x i32]] [[5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3], [5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3], [5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3], [5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3], [5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3]], [5 x [5 x i32]] [[5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3], [5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3], [5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3], [5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3], [5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3]], [5 x [5 x i32]] [[5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3], [5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3], [5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3], [5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3], [5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3]], [5 x [5 x i32]] [[5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3], [5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3], [5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3], [5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3], [5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3]], [5 x [5 x i32]] [[5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3], [5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3], [5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3], [5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3], [5 x i32] [i32 3, i32 3, i32 3, i32 3, i32 3]]], [5 x [5 x [5 x i32]]] [[5 x [5 x i32]] [[5 x i32] [i32 4, i32 4, i32 4, i32 4, i32 4], [5 x i32] [i32 4, i32 4, i32
@answer = dso_local local_unnamed_addr global [5 x [5 x [5 x [5 x i32]]]] [[5 x [5 x [5 x i32]]] [[5 x [5 x i32]] [[5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123], [5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123], [5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123], [5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123], [5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123]], [5 x [5 x i32]] [[5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123], [5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123], [5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123], [5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123], [5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123]], [5 x [5 x i32]] [[5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123], [5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123], [5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123], [5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123], [5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123]], [5 x [5 x i32]] [[5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123], [5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123], [5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123], [5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123], [5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123]], [5 x [5 x i32]] [[5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123], [5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123], [5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123], [5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123], [5 x i32] [i32 123, i32 123, i32 123, i32 123, i32 123]]], [5 x [5 x [5 x i32]]] [[5 x [5 x i32]] [[5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234], [5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234], [5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234], [5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234], [5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234]], [5 x [5 x i32]] [[5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234], [5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234], [5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234], [5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234], [5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234]], [5 x [5 x i32]] [[5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234], [5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234], [5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234], [5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234], [5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234]], [5 x [5 x i32]] [[5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234], [5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234], [5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234], [5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234], [5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234]], [5 x [5 x i32]] [[5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234], [5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234], [5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234], [5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234], [5 x i32] [i32 234, i32 234, i32 234, i32 234, i32 234]]], [5 x [5 x [5 x i32]]] [[5 x [5 x i32]] [[5 x i32] [i32 345, i32 345, i32 345, i32 345, i32 0], [5 x i32] [i32 345, i32 345, i32 345, i32 345, i32 0], [5 x i32] [i32 345, i32 345, i32 345, i32 345, i32 0], [5 x i32] [i32 345, i32 345, i32 345, i32 345, i32 0], [5 x i32] [i32 345, i32 345, i32 345, i32 345, i32 0]], [5 x [5 x i32]] [[5 x i32] [i32 345, i32 345, i32 345, i32 345, i32 0], [5 x i32] [i32 345, i32 345, i32 345, i32 345, i32 0], [5 x i32] [i32 345, i32 345, i32 345, i32 345, i32 0], [5 x i32] [i32 345, i32 345, i32 345, i32 345, i32 0], [5 x i32] [i32 345, i32 345, i32 345, i32 345, i32 0]], [5 x [5 x i32]] [[5 x i32] [i32 345, i32 345, i32 345, i32 345, i32 0], [5 x i32] [i32 345, i32 345, i32 345, i32 345, i32 0], [5 x i32] [i32 345, i32 345, i32 345, i32 345, i32 0], [5 x i32] [i32 345, i32 345, i32 345, i32 345, i32 0], [5 x i32] [i32 345, i32 345, i32 345, i32 345, i32 0]], [5 x [5 x i32]] [[5 x i32] [i32 345, i32
; Function Attrs: nofree norecurse nosync nounwind readonly sspstrong uwtable
define dso_local i32 @foo(i32 %0) local_unnamed_addr #0 {
br label %2
2: ; preds = %1, %30
%3 = phi i64 [ 0, %1 ], [ %31, %30 ]
br label %4
4: ; preds = %2, %27
%5 = phi i64 [ 0, %2 ], [ %28, %27 ]
br label %6
6: ; preds = %4, %24
%7 = phi i64 [ 0, %4 ], [ %25, %24 ]
br label %8
8: ; preds = %6, %21
%9 = phi i64 [ 0, %6 ], [ %22, %21 ]
%10 = getelementptr inbounds [5 x [5 x [5 x [5 x i32]]]], [5 x [5 x [5 x [5 x i32]]]]* @keys, i64 0, i64 %3, i64 %5, i64 %7, i64 %9
%11 = load i32, i32* %10, align 4, !tbaa !5
%12 = icmp eq i32 %11, %0
br i1 %12, label %13, label %21
13: ; preds = %8
%14 = and i64 %3, 4294967295
%15 = and i64 %5, 4294967295
%16 = and i64 %7, 4294967295
%17 = and i64 %9, 4294967295
%18 = getelementptr inbounds [5 x [5 x [5 x [5 x i32]]]], [5 x [5 x [5 x [5 x i32]]]]* @answer, i64 0, i64 %14, i64 %15, i64 %16, i64 %17
%19 = load i32, i32* %18, align 4, !tbaa !5
%20 = add nsw i32 %19, %11
br label %33
21: ; preds = %8
%22 = add nuw nsw i64 %9, 1
%23 = icmp eq i64 %22, 5
br i1 %23, label %24, label %8, !llvm.loop !9
24: ; preds = %21
%25 = add nuw nsw i64 %7, 1
%26 = icmp eq i64 %25, 5
br i1 %26, label %27, label %6, !llvm.loop !12
27: ; preds = %24
%28 = add nuw nsw i64 %5, 1
%29 = icmp eq i64 %28, 5
br i1 %29, label %30, label %4, !llvm.loop !13
30: ; preds = %27
%31 = add nuw nsw i64 %3, 1
%32 = icmp eq i64 %31, 5
br i1 %32, label %33, label %2, !llvm.loop !14
33: ; preds = %30, %13
%34 = phi i32 [ %20, %13 ], [ -1, %30 ]
ret i32 %34
}
; Function Attrs: nofree norecurse nosync nounwind readonly sspstrong uwtable
define dso_local void @main() local_unnamed_addr #0 {
br label %1
1: ; preds = %21, %0
%2 = phi i64 [ 0, %0 ], [ %22, %21 ]
br label %3
3: ; preds = %18, %1
%4 = phi i64 [ 0, %1 ], [ %19, %18 ]
br label %5
5: ; preds = %15, %3
%6 = phi i64 [ 0, %3 ], [ %16, %15 ]
br label %7
7: ; preds = %12, %5
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds [5 x [5 x [5 x [5 x i32]]]], [5 x [5 x [5 x [5 x i32]]]]* @keys, i64 0, i64 %2, i64 %4, i64 %6, i64 %8
%10 = load i32, i32* %9, align 4, !tbaa !5
%11 = icmp eq i32 %10, 400
br i1 %11, label %24, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, 5
br i1 %14, label %15, label %7, !llvm.loop !9
15: ; preds = %12
%16 = add nuw nsw i64 %6, 1
%17 = icmp eq i64 %16, 5
br i1 %17, label %18, label %5, !llvm.loop !12
18: ; preds = %15
%19 = add nuw nsw i64 %4, 1
%20 = icmp eq i64 %19, 5
br i1 %20, label %21, label %3, !llvm.loop !13
21: ; preds = %18
%22 = add nuw nsw i64 %2, 1
%23 = icmp eq i64 %22, 5
br i1 %23, label %24, label %1, !llvm.loop !14
24: ; preds = %21, %7
ret void
}
attributes #0 = { nofree norecurse nosync nounwind readonly sspstrong uwtable "frame-pointer"="none" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" "tune-cpu"="generic" }
!llvm.module.flags = !{!0, !1, !2, !3}
!llvm.ident = !{!4}
!0 = !{i32 1, !"wchar_size", i32 4}
!1 = !{i32 7, !"PIC Level", i32 2}
!2 = !{i32 7, !"PIE Level", i32 2}
!3 = !{i32 7, !"uwtable", i32 1}
!4 = !{!"clang version 13.0.1"}
!5 = !{!6, !6, i64 0}
!6 = !{!"int", !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
!8 = !{!"Simple C/C++ TBAA"}
!9 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.mustprogress"}
!11 = !{!"llvm.loop.unroll.disable"}
!12 = distinct !{!12, !10, !11}
!13 = distinct !{!13, !10, !11}
!14 = distinct !{!14, !10, !11}