From 3a66101cd22938459b766694d3af6a211de51095 Mon Sep 17 00:00:00 2001 From: caballa Date: Tue, 12 Sep 2023 21:50:53 -0600 Subject: [PATCH] tests: udpated bitcode to LLVM 14 --- tests/complete_callgraph_1.ll | 31 +++-- tests/complete_callgraph_10.ll | 65 +++++---- tests/complete_callgraph_11.ll | 67 +++++---- tests/complete_callgraph_12.ll | 76 ++++++----- tests/complete_callgraph_13.ll | 48 ++++--- tests/complete_callgraph_13b.ll | 46 ++++--- tests/complete_callgraph_14.ll | 46 ++++--- tests/complete_callgraph_15.ll | 56 ++++---- tests/complete_callgraph_16.ll | 182 ++++++++++++------------- tests/complete_callgraph_17.ll | 233 +++++++++++++++++++------------- tests/complete_callgraph_2.ll | 41 +++--- tests/complete_callgraph_3.ll | 41 +++--- tests/complete_callgraph_4.ll | 56 ++++---- tests/complete_callgraph_5.ll | 42 +++--- tests/complete_callgraph_6.ll | 33 +++-- tests/complete_callgraph_7.ll | 58 ++++---- tests/complete_callgraph_8.ll | 41 +++--- tests/complete_callgraph_9.ll | 42 +++--- tests/issue93_alias.ll | 71 +++++----- tests/issue97.ll | 79 ++++++----- 20 files changed, 749 insertions(+), 605 deletions(-) diff --git a/tests/complete_callgraph_1.ll b/tests/complete_callgraph_1.ll index 334127f4..4c3536b4 100644 --- a/tests/complete_callgraph_1.ll +++ b/tests/complete_callgraph_1.ll @@ -2,13 +2,13 @@ ; RUN: %cmp-graphs %tests/complete_callgraph_1.dot %T/complete_callgraph_1.ll/callgraph.dot | OutputCheck %s -d --comment=";" ; CHECK: ^OK$ -; ModuleID = 'complete_callgraph_1.bc' +; ModuleID = 'complete_callgraph_1.c' source_filename = "complete_callgraph_1.c" -target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-apple-macosx10.14.0" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx13.0.0" ; Function Attrs: noinline nounwind optnone ssp uwtable -define i32 @add(i32, i32) #0 { +define i32 @add(i32 %0, i32 %1) #0 { %3 = alloca i32, align 4 %4 = alloca i32, align 4 store i32 %0, i32* %3, align 4 @@ -20,7 +20,7 @@ define i32 @add(i32, i32) #0 { } ; Function Attrs: noinline nounwind optnone ssp uwtable -define i32 @sub(i32, i32) #0 { +define i32 @sub(i32 %0, i32 %1) #0 { %3 = alloca i32, align 4 %4 = alloca i32, align 4 store i32 %0, i32* %3, align 4 @@ -32,7 +32,7 @@ define i32 @sub(i32, i32) #0 { } ; Function Attrs: noinline nounwind optnone ssp uwtable -define i32 @use(i32 (i32, i32)*) #0 { +define i32 @use(i32 (i32, i32)* %0) #0 { %2 = alloca i32 (i32, i32)*, align 8 %3 = alloca i32, align 4 store i32 (i32, i32)* %0, i32 (i32, i32)** %2, align 8 @@ -59,11 +59,18 @@ define i32 @main() #0 { ret i32 %8 } -attributes #0 = { noinline nounwind optnone ssp uwtable "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="penryn" "target-features"="+cx16,+fxsr,+mmx,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87" "unsafe-fp-math"="false" "use-soft-float"="false" } +attributes #0 = { noinline nounwind optnone ssp uwtable "frame-pointer"="non-leaf" "min-legal-vector-width"="0" "no-trapping-math"="true" "probe-stack"="__chkstk_darwin" "stack-protector-buffer-size"="8" "target-cpu"="apple-m1" "target-features"="+aes,+crc,+crypto,+dotprod,+fp-armv8,+fp16fml,+fullfp16,+lse,+neon,+ras,+rcpc,+rdm,+sha2,+sha3,+sm4,+v8.5a,+zcm,+zcz" } -!llvm.module.flags = !{!0, !1} -!llvm.ident = !{!2} +!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8} +!llvm.ident = !{!9} -!0 = !{i32 1, !"wchar_size", i32 4} -!1 = !{i32 7, !"PIC Level", i32 2} -!2 = !{!"clang version 5.0.0 (tags/RELEASE_500/final)"} +!0 = !{i32 2, !"SDK Version", [2 x i32] [i32 13, i32 1]} +!1 = !{i32 1, !"wchar_size", i32 4} +!2 = !{i32 1, !"branch-target-enforcement", i32 0} +!3 = !{i32 1, !"sign-return-address", i32 0} +!4 = !{i32 1, !"sign-return-address-all", i32 0} +!5 = !{i32 1, !"sign-return-address-with-bkey", i32 0} +!6 = !{i32 7, !"PIC Level", i32 2} +!7 = !{i32 7, !"uwtable", i32 1} +!8 = !{i32 7, !"frame-pointer", i32 1} +!9 = !{!"Apple clang version 14.0.0 (clang-1400.0.29.202)"} diff --git a/tests/complete_callgraph_10.ll b/tests/complete_callgraph_10.ll index 7a642663..aa3e25bc 100644 --- a/tests/complete_callgraph_10.ll +++ b/tests/complete_callgraph_10.ll @@ -2,15 +2,15 @@ ; RUN: %cmp-graphs %tests/complete_callgraph_10.dot %T/complete_callgraph_10.ll/callgraph.dot | OutputCheck %s -d --comment=";" ; CHECK: ^OK$ -; ModuleID = 'complete_callgraph_10.bc' -source_filename = "../tests/c/complete_callgraph_10.c" -target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" -target triple = "x86_64-apple-macosx10.14.0" +; ModuleID = 'complete_callgraph_10.c' +source_filename = "complete_callgraph_10.c" +target datalayout = "e-m:o-i64:64-i128:128-n32:64-S128" +target triple = "arm64-apple-macosx13.0.0" -@arith_functions = global [4 x i32 (i32, i32)*] [i32 (i32, i32)* @add, i32 (i32, i32)* @sub, i32 (i32, i32)* @mul, i32 (i32, i32)* @div], align 16 +@arith_functions = global [4 x i32 (i32, i32)*] [i32 (i32, i32)* @add, i32 (i32, i32)* @sub, i32 (i32, i32)* @mul, i32 (i32, i32)* @div], align 8 ; Function Attrs: noinline nounwind optnone ssp uwtable -define i32 @add(i32, i32) #0 { +define i32 @add(i32 %0, i32 %1) #0 { %3 = alloca i32, align 4 %4 = alloca i32, align 4 store i32 %0, i32* %3, align 4 @@ -22,7 +22,7 @@ define i32 @add(i32, i32) #0 { } ; Function Attrs: noinline nounwind optnone ssp uwtable -define i32 @sub(i32, i32) #0 { +define i32 @sub(i32 %0, i32 %1) #0 { %3 = alloca i32, align 4 %4 = alloca i32, align 4 store i32 %0, i32* %3, align 4 @@ -34,7 +34,7 @@ define i32 @sub(i32, i32) #0 { } ; Function Attrs: noinline nounwind optnone ssp uwtable -define i32 @mul(i32, i32) #0 { +define i32 @mul(i32 %0, i32 %1) #0 { %3 = alloca i32, align 4 %4 = alloca i32, align 4 store i32 %0, i32* %3, align 4 @@ -46,7 +46,7 @@ define i32 @mul(i32, i32) #0 { } ; Function Attrs: noinline nounwind optnone ssp uwtable -define i32 @div(i32, i32) #0 { +define i32 @div(i32 %0, i32 %1) #0 { %3 = alloca i32, align 4 %4 = alloca i32, align 4 store i32 %0, i32* %3, align 4 @@ -65,11 +65,11 @@ define i32 @main() #0 { %4 = alloca i32, align 4 store i32 0, i32* %1, align 4 store i32 0, i32* %2, align 4 - %5 = call i32 (...) @nd_uint() + %5 = call i32 bitcast (i32 (...)* @nd_uint to i32 ()*)() store i32 %5, i32* %3, align 4 - %6 = call i32 (...) @nd_uint() + %6 = call i32 bitcast (i32 (...)* @nd_uint to i32 ()*)() store i32 %6, i32* %4, align 4 - %7 = call i32 (...) @nd_uint() + %7 = call i32 bitcast (i32 (...)* @nd_uint to i32 ()*)() switch i32 %7, label %28 [ i32 0, label %8 i32 1, label %13 @@ -77,15 +77,15 @@ define i32 @main() #0 { i32 3, label %23 ] -;