internal/cabi: TestBuild TestABI
This commit is contained in:
269
internal/cabi/_testdata/arch/armv6/array_float32.ll
Normal file
269
internal/cabi/_testdata/arch/armv6/array_float32.ll
Normal file
@@ -0,0 +1,269 @@
|
||||
; ModuleID = '../../wrap/array_float32.c'
|
||||
source_filename = "../../wrap/array_float32.c"
|
||||
target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
target triple = "armv6kz-unknown-linux-gnueabihf"
|
||||
|
||||
%struct.array1 = type { [1 x float] }
|
||||
%struct.array2 = type { [2 x float] }
|
||||
%struct.array3 = type { [3 x float] }
|
||||
%struct.array4 = type { [4 x float] }
|
||||
%struct.array5 = type { [5 x float] }
|
||||
%struct.array6 = type { [6 x float] }
|
||||
%struct.array7 = type { [7 x float] }
|
||||
%struct.array8 = type { [8 x float] }
|
||||
%struct.array9 = type { [9 x float] }
|
||||
%struct.array10 = type { [10 x float] }
|
||||
%struct.array11 = type { [11 x float] }
|
||||
%struct.array12 = type { [12 x float] }
|
||||
%struct.array13 = type { [13 x float] }
|
||||
%struct.array14 = type { [14 x float] }
|
||||
%struct.array15 = type { [15 x float] }
|
||||
%struct.array16 = type { [16 x float] }
|
||||
%struct.array17 = type { [17 x float] }
|
||||
%struct.array18 = type { [18 x float] }
|
||||
%struct.array19 = type { [19 x float] }
|
||||
%struct.array20 = type { [20 x float] }
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local %struct.array1 @demo1(%struct.array1 %0) #0 {
|
||||
%2 = alloca %struct.array1, align 4
|
||||
%3 = alloca %struct.array1, align 4
|
||||
store %struct.array1 %0, %struct.array1* %3, align 4
|
||||
%4 = bitcast %struct.array1* %2 to i8*
|
||||
%5 = bitcast %struct.array1* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %4, i8* align 4 %5, i32 4, i1 false)
|
||||
%6 = load %struct.array1, %struct.array1* %2, align 4
|
||||
ret %struct.array1 %6
|
||||
}
|
||||
|
||||
; Function Attrs: argmemonly nofree nounwind willreturn
|
||||
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i32, i1 immarg) #1
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local %struct.array2 @demo2(%struct.array2 %0) #0 {
|
||||
%2 = alloca %struct.array2, align 4
|
||||
%3 = alloca %struct.array2, align 4
|
||||
store %struct.array2 %0, %struct.array2* %3, align 4
|
||||
%4 = bitcast %struct.array2* %2 to i8*
|
||||
%5 = bitcast %struct.array2* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %4, i8* align 4 %5, i32 8, i1 false)
|
||||
%6 = load %struct.array2, %struct.array2* %2, align 4
|
||||
ret %struct.array2 %6
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local %struct.array3 @demo3(%struct.array3 %0) #0 {
|
||||
%2 = alloca %struct.array3, align 4
|
||||
%3 = alloca %struct.array3, align 4
|
||||
store %struct.array3 %0, %struct.array3* %3, align 4
|
||||
%4 = bitcast %struct.array3* %2 to i8*
|
||||
%5 = bitcast %struct.array3* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %4, i8* align 4 %5, i32 12, i1 false)
|
||||
%6 = load %struct.array3, %struct.array3* %2, align 4
|
||||
ret %struct.array3 %6
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local %struct.array4 @demo4(%struct.array4 %0) #0 {
|
||||
%2 = alloca %struct.array4, align 4
|
||||
%3 = alloca %struct.array4, align 4
|
||||
store %struct.array4 %0, %struct.array4* %3, align 4
|
||||
%4 = bitcast %struct.array4* %2 to i8*
|
||||
%5 = bitcast %struct.array4* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %4, i8* align 4 %5, i32 16, i1 false)
|
||||
%6 = load %struct.array4, %struct.array4* %2, align 4
|
||||
ret %struct.array4 %6
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo5(%struct.array5* noalias sret(%struct.array5) align 4 %0, [5 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array5, align 4
|
||||
%4 = getelementptr inbounds %struct.array5, %struct.array5* %3, i32 0, i32 0
|
||||
%5 = bitcast [5 x float]* %4 to [5 x i32]*
|
||||
store [5 x i32] %1, [5 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array5* %0 to i8*
|
||||
%7 = bitcast %struct.array5* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 20, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo6(%struct.array6* noalias sret(%struct.array6) align 4 %0, [6 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array6, align 4
|
||||
%4 = getelementptr inbounds %struct.array6, %struct.array6* %3, i32 0, i32 0
|
||||
%5 = bitcast [6 x float]* %4 to [6 x i32]*
|
||||
store [6 x i32] %1, [6 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array6* %0 to i8*
|
||||
%7 = bitcast %struct.array6* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 24, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo7(%struct.array7* noalias sret(%struct.array7) align 4 %0, [7 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array7, align 4
|
||||
%4 = getelementptr inbounds %struct.array7, %struct.array7* %3, i32 0, i32 0
|
||||
%5 = bitcast [7 x float]* %4 to [7 x i32]*
|
||||
store [7 x i32] %1, [7 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array7* %0 to i8*
|
||||
%7 = bitcast %struct.array7* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 28, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo8(%struct.array8* noalias sret(%struct.array8) align 4 %0, [8 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array8, align 4
|
||||
%4 = getelementptr inbounds %struct.array8, %struct.array8* %3, i32 0, i32 0
|
||||
%5 = bitcast [8 x float]* %4 to [8 x i32]*
|
||||
store [8 x i32] %1, [8 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array8* %0 to i8*
|
||||
%7 = bitcast %struct.array8* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 32, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo9(%struct.array9* noalias sret(%struct.array9) align 4 %0, [9 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array9, align 4
|
||||
%4 = getelementptr inbounds %struct.array9, %struct.array9* %3, i32 0, i32 0
|
||||
%5 = bitcast [9 x float]* %4 to [9 x i32]*
|
||||
store [9 x i32] %1, [9 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array9* %0 to i8*
|
||||
%7 = bitcast %struct.array9* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 36, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo10(%struct.array10* noalias sret(%struct.array10) align 4 %0, [10 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array10, align 4
|
||||
%4 = getelementptr inbounds %struct.array10, %struct.array10* %3, i32 0, i32 0
|
||||
%5 = bitcast [10 x float]* %4 to [10 x i32]*
|
||||
store [10 x i32] %1, [10 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array10* %0 to i8*
|
||||
%7 = bitcast %struct.array10* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 40, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo11(%struct.array11* noalias sret(%struct.array11) align 4 %0, [11 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array11, align 4
|
||||
%4 = getelementptr inbounds %struct.array11, %struct.array11* %3, i32 0, i32 0
|
||||
%5 = bitcast [11 x float]* %4 to [11 x i32]*
|
||||
store [11 x i32] %1, [11 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array11* %0 to i8*
|
||||
%7 = bitcast %struct.array11* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 44, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo12(%struct.array12* noalias sret(%struct.array12) align 4 %0, [12 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array12, align 4
|
||||
%4 = getelementptr inbounds %struct.array12, %struct.array12* %3, i32 0, i32 0
|
||||
%5 = bitcast [12 x float]* %4 to [12 x i32]*
|
||||
store [12 x i32] %1, [12 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array12* %0 to i8*
|
||||
%7 = bitcast %struct.array12* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 48, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo13(%struct.array13* noalias sret(%struct.array13) align 4 %0, [13 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array13, align 4
|
||||
%4 = getelementptr inbounds %struct.array13, %struct.array13* %3, i32 0, i32 0
|
||||
%5 = bitcast [13 x float]* %4 to [13 x i32]*
|
||||
store [13 x i32] %1, [13 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array13* %0 to i8*
|
||||
%7 = bitcast %struct.array13* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 52, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo14(%struct.array14* noalias sret(%struct.array14) align 4 %0, [14 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array14, align 4
|
||||
%4 = getelementptr inbounds %struct.array14, %struct.array14* %3, i32 0, i32 0
|
||||
%5 = bitcast [14 x float]* %4 to [14 x i32]*
|
||||
store [14 x i32] %1, [14 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array14* %0 to i8*
|
||||
%7 = bitcast %struct.array14* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 56, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo15(%struct.array15* noalias sret(%struct.array15) align 4 %0, [15 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array15, align 4
|
||||
%4 = getelementptr inbounds %struct.array15, %struct.array15* %3, i32 0, i32 0
|
||||
%5 = bitcast [15 x float]* %4 to [15 x i32]*
|
||||
store [15 x i32] %1, [15 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array15* %0 to i8*
|
||||
%7 = bitcast %struct.array15* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 60, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo16(%struct.array16* noalias sret(%struct.array16) align 4 %0, [16 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array16, align 4
|
||||
%4 = getelementptr inbounds %struct.array16, %struct.array16* %3, i32 0, i32 0
|
||||
%5 = bitcast [16 x float]* %4 to [16 x i32]*
|
||||
store [16 x i32] %1, [16 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array16* %0 to i8*
|
||||
%7 = bitcast %struct.array16* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 64, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo17(%struct.array17* noalias sret(%struct.array17) align 4 %0, %struct.array17* noundef byval(%struct.array17) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.array17* %0 to i8*
|
||||
%4 = bitcast %struct.array17* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 68, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo18(%struct.array18* noalias sret(%struct.array18) align 4 %0, %struct.array18* noundef byval(%struct.array18) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.array18* %0 to i8*
|
||||
%4 = bitcast %struct.array18* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 72, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo19(%struct.array19* noalias sret(%struct.array19) align 4 %0, %struct.array19* noundef byval(%struct.array19) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.array19* %0 to i8*
|
||||
%4 = bitcast %struct.array19* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 76, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo20(%struct.array20* noalias sret(%struct.array20) align 4 %0, %struct.array20* noundef byval(%struct.array20) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.array20* %0 to i8*
|
||||
%4 = bitcast %struct.array20* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 80, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="arm1176jzf-s" "target-features"="+armv6kz,+dsp,+fp64,+strict-align,+vfp2,+vfp2sp,-aes,-d32,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fullfp16,-neon,-sha2,-thumb-mode,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp" }
|
||||
attributes #1 = { argmemonly nofree nounwind willreturn }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!llvm.ident = !{!9}
|
||||
|
||||
!0 = !{i32 1, !"wchar_size", i32 4}
|
||||
!1 = !{i32 1, !"min_enum_size", i32 4}
|
||||
!2 = !{i32 8, !"branch-target-enforcement", i32 0}
|
||||
!3 = !{i32 8, !"sign-return-address", i32 0}
|
||||
!4 = !{i32 8, !"sign-return-address-all", i32 0}
|
||||
!5 = !{i32 8, !"sign-return-address-with-bkey", i32 0}
|
||||
!6 = !{i32 7, !"PIC Level", i32 2}
|
||||
!7 = !{i32 7, !"PIE Level", i32 2}
|
||||
!8 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!9 = !{!"Apple clang version 14.0.3 (clang-1403.0.22.14.1)"}
|
||||
237
internal/cabi/_testdata/arch/armv6/array_float64.ll
Normal file
237
internal/cabi/_testdata/arch/armv6/array_float64.ll
Normal file
@@ -0,0 +1,237 @@
|
||||
; ModuleID = '../../wrap/array_float64.c'
|
||||
source_filename = "../../wrap/array_float64.c"
|
||||
target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
target triple = "armv6kz-unknown-linux-gnueabihf"
|
||||
|
||||
%struct.array1 = type { [1 x double] }
|
||||
%struct.array2 = type { [2 x double] }
|
||||
%struct.array3 = type { [3 x double] }
|
||||
%struct.array4 = type { [4 x double] }
|
||||
%struct.array5 = type { [5 x double] }
|
||||
%struct.array6 = type { [6 x double] }
|
||||
%struct.array7 = type { [7 x double] }
|
||||
%struct.array8 = type { [8 x double] }
|
||||
%struct.array9 = type { [9 x double] }
|
||||
%struct.array10 = type { [10 x double] }
|
||||
%struct.array11 = type { [11 x double] }
|
||||
%struct.array12 = type { [12 x double] }
|
||||
%struct.array13 = type { [13 x double] }
|
||||
%struct.array14 = type { [14 x double] }
|
||||
%struct.array15 = type { [15 x double] }
|
||||
%struct.array16 = type { [16 x double] }
|
||||
%struct.array17 = type { [17 x double] }
|
||||
%struct.array18 = type { [18 x double] }
|
||||
%struct.array19 = type { [19 x double] }
|
||||
%struct.array20 = type { [20 x double] }
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local %struct.array1 @demo1(%struct.array1 %0) #0 {
|
||||
%2 = alloca %struct.array1, align 8
|
||||
%3 = alloca %struct.array1, align 8
|
||||
store %struct.array1 %0, %struct.array1* %3, align 8
|
||||
%4 = bitcast %struct.array1* %2 to i8*
|
||||
%5 = bitcast %struct.array1* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %4, i8* align 8 %5, i32 8, i1 false)
|
||||
%6 = load %struct.array1, %struct.array1* %2, align 8
|
||||
ret %struct.array1 %6
|
||||
}
|
||||
|
||||
; Function Attrs: argmemonly nofree nounwind willreturn
|
||||
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i32, i1 immarg) #1
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local %struct.array2 @demo2(%struct.array2 %0) #0 {
|
||||
%2 = alloca %struct.array2, align 8
|
||||
%3 = alloca %struct.array2, align 8
|
||||
store %struct.array2 %0, %struct.array2* %3, align 8
|
||||
%4 = bitcast %struct.array2* %2 to i8*
|
||||
%5 = bitcast %struct.array2* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %4, i8* align 8 %5, i32 16, i1 false)
|
||||
%6 = load %struct.array2, %struct.array2* %2, align 8
|
||||
ret %struct.array2 %6
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local %struct.array3 @demo3(%struct.array3 %0) #0 {
|
||||
%2 = alloca %struct.array3, align 8
|
||||
%3 = alloca %struct.array3, align 8
|
||||
store %struct.array3 %0, %struct.array3* %3, align 8
|
||||
%4 = bitcast %struct.array3* %2 to i8*
|
||||
%5 = bitcast %struct.array3* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %4, i8* align 8 %5, i32 24, i1 false)
|
||||
%6 = load %struct.array3, %struct.array3* %2, align 8
|
||||
ret %struct.array3 %6
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local %struct.array4 @demo4(%struct.array4 %0) #0 {
|
||||
%2 = alloca %struct.array4, align 8
|
||||
%3 = alloca %struct.array4, align 8
|
||||
store %struct.array4 %0, %struct.array4* %3, align 8
|
||||
%4 = bitcast %struct.array4* %2 to i8*
|
||||
%5 = bitcast %struct.array4* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %4, i8* align 8 %5, i32 32, i1 false)
|
||||
%6 = load %struct.array4, %struct.array4* %2, align 8
|
||||
ret %struct.array4 %6
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo5(%struct.array5* noalias sret(%struct.array5) align 8 %0, [5 x i64] %1) #0 {
|
||||
%3 = alloca %struct.array5, align 8
|
||||
%4 = getelementptr inbounds %struct.array5, %struct.array5* %3, i32 0, i32 0
|
||||
%5 = bitcast [5 x double]* %4 to [5 x i64]*
|
||||
store [5 x i64] %1, [5 x i64]* %5, align 8
|
||||
%6 = bitcast %struct.array5* %0 to i8*
|
||||
%7 = bitcast %struct.array5* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %6, i8* align 8 %7, i32 40, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo6(%struct.array6* noalias sret(%struct.array6) align 8 %0, [6 x i64] %1) #0 {
|
||||
%3 = alloca %struct.array6, align 8
|
||||
%4 = getelementptr inbounds %struct.array6, %struct.array6* %3, i32 0, i32 0
|
||||
%5 = bitcast [6 x double]* %4 to [6 x i64]*
|
||||
store [6 x i64] %1, [6 x i64]* %5, align 8
|
||||
%6 = bitcast %struct.array6* %0 to i8*
|
||||
%7 = bitcast %struct.array6* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %6, i8* align 8 %7, i32 48, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo7(%struct.array7* noalias sret(%struct.array7) align 8 %0, [7 x i64] %1) #0 {
|
||||
%3 = alloca %struct.array7, align 8
|
||||
%4 = getelementptr inbounds %struct.array7, %struct.array7* %3, i32 0, i32 0
|
||||
%5 = bitcast [7 x double]* %4 to [7 x i64]*
|
||||
store [7 x i64] %1, [7 x i64]* %5, align 8
|
||||
%6 = bitcast %struct.array7* %0 to i8*
|
||||
%7 = bitcast %struct.array7* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %6, i8* align 8 %7, i32 56, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo8(%struct.array8* noalias sret(%struct.array8) align 8 %0, [8 x i64] %1) #0 {
|
||||
%3 = alloca %struct.array8, align 8
|
||||
%4 = getelementptr inbounds %struct.array8, %struct.array8* %3, i32 0, i32 0
|
||||
%5 = bitcast [8 x double]* %4 to [8 x i64]*
|
||||
store [8 x i64] %1, [8 x i64]* %5, align 8
|
||||
%6 = bitcast %struct.array8* %0 to i8*
|
||||
%7 = bitcast %struct.array8* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %6, i8* align 8 %7, i32 64, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo9(%struct.array9* noalias sret(%struct.array9) align 8 %0, %struct.array9* noundef byval(%struct.array9) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array9* %0 to i8*
|
||||
%4 = bitcast %struct.array9* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 72, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo10(%struct.array10* noalias sret(%struct.array10) align 8 %0, %struct.array10* noundef byval(%struct.array10) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array10* %0 to i8*
|
||||
%4 = bitcast %struct.array10* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 80, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo11(%struct.array11* noalias sret(%struct.array11) align 8 %0, %struct.array11* noundef byval(%struct.array11) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array11* %0 to i8*
|
||||
%4 = bitcast %struct.array11* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 88, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo12(%struct.array12* noalias sret(%struct.array12) align 8 %0, %struct.array12* noundef byval(%struct.array12) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array12* %0 to i8*
|
||||
%4 = bitcast %struct.array12* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 96, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo13(%struct.array13* noalias sret(%struct.array13) align 8 %0, %struct.array13* noundef byval(%struct.array13) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array13* %0 to i8*
|
||||
%4 = bitcast %struct.array13* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 104, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo14(%struct.array14* noalias sret(%struct.array14) align 8 %0, %struct.array14* noundef byval(%struct.array14) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array14* %0 to i8*
|
||||
%4 = bitcast %struct.array14* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 112, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo15(%struct.array15* noalias sret(%struct.array15) align 8 %0, %struct.array15* noundef byval(%struct.array15) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array15* %0 to i8*
|
||||
%4 = bitcast %struct.array15* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 120, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo16(%struct.array16* noalias sret(%struct.array16) align 8 %0, %struct.array16* noundef byval(%struct.array16) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array16* %0 to i8*
|
||||
%4 = bitcast %struct.array16* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 128, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo17(%struct.array17* noalias sret(%struct.array17) align 8 %0, %struct.array17* noundef byval(%struct.array17) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array17* %0 to i8*
|
||||
%4 = bitcast %struct.array17* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 136, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo18(%struct.array18* noalias sret(%struct.array18) align 8 %0, %struct.array18* noundef byval(%struct.array18) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array18* %0 to i8*
|
||||
%4 = bitcast %struct.array18* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 144, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo19(%struct.array19* noalias sret(%struct.array19) align 8 %0, %struct.array19* noundef byval(%struct.array19) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array19* %0 to i8*
|
||||
%4 = bitcast %struct.array19* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 152, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo20(%struct.array20* noalias sret(%struct.array20) align 8 %0, %struct.array20* noundef byval(%struct.array20) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array20* %0 to i8*
|
||||
%4 = bitcast %struct.array20* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 160, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="arm1176jzf-s" "target-features"="+armv6kz,+dsp,+fp64,+strict-align,+vfp2,+vfp2sp,-aes,-d32,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fullfp16,-neon,-sha2,-thumb-mode,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp" }
|
||||
attributes #1 = { argmemonly nofree nounwind willreturn }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!llvm.ident = !{!9}
|
||||
|
||||
!0 = !{i32 1, !"wchar_size", i32 4}
|
||||
!1 = !{i32 1, !"min_enum_size", i32 4}
|
||||
!2 = !{i32 8, !"branch-target-enforcement", i32 0}
|
||||
!3 = !{i32 8, !"sign-return-address", i32 0}
|
||||
!4 = !{i32 8, !"sign-return-address-all", i32 0}
|
||||
!5 = !{i32 8, !"sign-return-address-with-bkey", i32 0}
|
||||
!6 = !{i32 7, !"PIC Level", i32 2}
|
||||
!7 = !{i32 7, !"PIE Level", i32 2}
|
||||
!8 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!9 = !{!"Apple clang version 14.0.3 (clang-1403.0.22.14.1)"}
|
||||
323
internal/cabi/_testdata/arch/armv6/array_int16.ll
Normal file
323
internal/cabi/_testdata/arch/armv6/array_int16.ll
Normal file
@@ -0,0 +1,323 @@
|
||||
; ModuleID = '../../wrap/array_int16.c'
|
||||
source_filename = "../../wrap/array_int16.c"
|
||||
target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
target triple = "armv6kz-unknown-linux-gnueabihf"
|
||||
|
||||
%struct.array1 = type { [1 x i16] }
|
||||
%struct.array2 = type { [2 x i16] }
|
||||
%struct.array3 = type { [3 x i16] }
|
||||
%struct.array4 = type { [4 x i16] }
|
||||
%struct.array5 = type { [5 x i16] }
|
||||
%struct.array6 = type { [6 x i16] }
|
||||
%struct.array7 = type { [7 x i16] }
|
||||
%struct.array8 = type { [8 x i16] }
|
||||
%struct.array9 = type { [9 x i16] }
|
||||
%struct.array10 = type { [10 x i16] }
|
||||
%struct.array11 = type { [11 x i16] }
|
||||
%struct.array12 = type { [12 x i16] }
|
||||
%struct.array13 = type { [13 x i16] }
|
||||
%struct.array14 = type { [14 x i16] }
|
||||
%struct.array15 = type { [15 x i16] }
|
||||
%struct.array16 = type { [16 x i16] }
|
||||
%struct.array17 = type { [17 x i16] }
|
||||
%struct.array18 = type { [18 x i16] }
|
||||
%struct.array19 = type { [19 x i16] }
|
||||
%struct.array20 = type { [20 x i16] }
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local i16 @demo1([1 x i32] %0) #0 {
|
||||
%2 = alloca %struct.array1, align 2
|
||||
%3 = alloca %struct.array1, align 2
|
||||
%4 = alloca [1 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array1, %struct.array1* %3, i32 0, i32 0
|
||||
store [1 x i32] %0, [1 x i32]* %4, align 4
|
||||
%6 = bitcast [1 x i16]* %5 to i8*
|
||||
%7 = bitcast [1 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 4 %7, i32 2, i1 false)
|
||||
%8 = bitcast %struct.array1* %2 to i8*
|
||||
%9 = bitcast %struct.array1* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %8, i8* align 2 %9, i32 2, i1 false)
|
||||
%10 = getelementptr inbounds %struct.array1, %struct.array1* %2, i32 0, i32 0
|
||||
%11 = bitcast [1 x i16]* %10 to i16*
|
||||
%12 = load i16, i16* %11, align 2
|
||||
ret i16 %12
|
||||
}
|
||||
|
||||
; Function Attrs: argmemonly nofree nounwind willreturn
|
||||
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i32, i1 immarg) #1
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local i32 @demo2([1 x i32] %0) #0 {
|
||||
%2 = alloca %struct.array2, align 2
|
||||
%3 = alloca %struct.array2, align 2
|
||||
%4 = getelementptr inbounds %struct.array2, %struct.array2* %3, i32 0, i32 0
|
||||
%5 = bitcast [2 x i16]* %4 to [1 x i32]*
|
||||
store [1 x i32] %0, [1 x i32]* %5, align 2
|
||||
%6 = bitcast %struct.array2* %2 to i8*
|
||||
%7 = bitcast %struct.array2* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 2 %7, i32 4, i1 false)
|
||||
%8 = getelementptr inbounds %struct.array2, %struct.array2* %2, i32 0, i32 0
|
||||
%9 = bitcast [2 x i16]* %8 to i32*
|
||||
%10 = load i32, i32* %9, align 2
|
||||
ret i32 %10
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo3(%struct.array3* noalias sret(%struct.array3) align 2 %0, [2 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array3, align 2
|
||||
%4 = alloca [2 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array3, %struct.array3* %3, i32 0, i32 0
|
||||
store [2 x i32] %1, [2 x i32]* %4, align 4
|
||||
%6 = bitcast [3 x i16]* %5 to i8*
|
||||
%7 = bitcast [2 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 4 %7, i32 6, i1 false)
|
||||
%8 = bitcast %struct.array3* %0 to i8*
|
||||
%9 = bitcast %struct.array3* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %8, i8* align 2 %9, i32 6, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo4(%struct.array4* noalias sret(%struct.array4) align 2 %0, [2 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array4, align 2
|
||||
%4 = getelementptr inbounds %struct.array4, %struct.array4* %3, i32 0, i32 0
|
||||
%5 = bitcast [4 x i16]* %4 to [2 x i32]*
|
||||
store [2 x i32] %1, [2 x i32]* %5, align 2
|
||||
%6 = bitcast %struct.array4* %0 to i8*
|
||||
%7 = bitcast %struct.array4* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 2 %7, i32 8, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo5(%struct.array5* noalias sret(%struct.array5) align 2 %0, [3 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array5, align 2
|
||||
%4 = alloca [3 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array5, %struct.array5* %3, i32 0, i32 0
|
||||
store [3 x i32] %1, [3 x i32]* %4, align 4
|
||||
%6 = bitcast [5 x i16]* %5 to i8*
|
||||
%7 = bitcast [3 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 4 %7, i32 10, i1 false)
|
||||
%8 = bitcast %struct.array5* %0 to i8*
|
||||
%9 = bitcast %struct.array5* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %8, i8* align 2 %9, i32 10, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo6(%struct.array6* noalias sret(%struct.array6) align 2 %0, [3 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array6, align 2
|
||||
%4 = getelementptr inbounds %struct.array6, %struct.array6* %3, i32 0, i32 0
|
||||
%5 = bitcast [6 x i16]* %4 to [3 x i32]*
|
||||
store [3 x i32] %1, [3 x i32]* %5, align 2
|
||||
%6 = bitcast %struct.array6* %0 to i8*
|
||||
%7 = bitcast %struct.array6* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 2 %7, i32 12, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo7(%struct.array7* noalias sret(%struct.array7) align 2 %0, [4 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array7, align 2
|
||||
%4 = alloca [4 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array7, %struct.array7* %3, i32 0, i32 0
|
||||
store [4 x i32] %1, [4 x i32]* %4, align 4
|
||||
%6 = bitcast [7 x i16]* %5 to i8*
|
||||
%7 = bitcast [4 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 4 %7, i32 14, i1 false)
|
||||
%8 = bitcast %struct.array7* %0 to i8*
|
||||
%9 = bitcast %struct.array7* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %8, i8* align 2 %9, i32 14, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo8(%struct.array8* noalias sret(%struct.array8) align 2 %0, [4 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array8, align 2
|
||||
%4 = getelementptr inbounds %struct.array8, %struct.array8* %3, i32 0, i32 0
|
||||
%5 = bitcast [8 x i16]* %4 to [4 x i32]*
|
||||
store [4 x i32] %1, [4 x i32]* %5, align 2
|
||||
%6 = bitcast %struct.array8* %0 to i8*
|
||||
%7 = bitcast %struct.array8* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 2 %7, i32 16, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo9(%struct.array9* noalias sret(%struct.array9) align 2 %0, [5 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array9, align 2
|
||||
%4 = alloca [5 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array9, %struct.array9* %3, i32 0, i32 0
|
||||
store [5 x i32] %1, [5 x i32]* %4, align 4
|
||||
%6 = bitcast [9 x i16]* %5 to i8*
|
||||
%7 = bitcast [5 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 4 %7, i32 18, i1 false)
|
||||
%8 = bitcast %struct.array9* %0 to i8*
|
||||
%9 = bitcast %struct.array9* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %8, i8* align 2 %9, i32 18, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo10(%struct.array10* noalias sret(%struct.array10) align 2 %0, [5 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array10, align 2
|
||||
%4 = getelementptr inbounds %struct.array10, %struct.array10* %3, i32 0, i32 0
|
||||
%5 = bitcast [10 x i16]* %4 to [5 x i32]*
|
||||
store [5 x i32] %1, [5 x i32]* %5, align 2
|
||||
%6 = bitcast %struct.array10* %0 to i8*
|
||||
%7 = bitcast %struct.array10* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 2 %7, i32 20, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo11(%struct.array11* noalias sret(%struct.array11) align 2 %0, [6 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array11, align 2
|
||||
%4 = alloca [6 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array11, %struct.array11* %3, i32 0, i32 0
|
||||
store [6 x i32] %1, [6 x i32]* %4, align 4
|
||||
%6 = bitcast [11 x i16]* %5 to i8*
|
||||
%7 = bitcast [6 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 4 %7, i32 22, i1 false)
|
||||
%8 = bitcast %struct.array11* %0 to i8*
|
||||
%9 = bitcast %struct.array11* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %8, i8* align 2 %9, i32 22, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo12(%struct.array12* noalias sret(%struct.array12) align 2 %0, [6 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array12, align 2
|
||||
%4 = getelementptr inbounds %struct.array12, %struct.array12* %3, i32 0, i32 0
|
||||
%5 = bitcast [12 x i16]* %4 to [6 x i32]*
|
||||
store [6 x i32] %1, [6 x i32]* %5, align 2
|
||||
%6 = bitcast %struct.array12* %0 to i8*
|
||||
%7 = bitcast %struct.array12* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 2 %7, i32 24, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo13(%struct.array13* noalias sret(%struct.array13) align 2 %0, [7 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array13, align 2
|
||||
%4 = alloca [7 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array13, %struct.array13* %3, i32 0, i32 0
|
||||
store [7 x i32] %1, [7 x i32]* %4, align 4
|
||||
%6 = bitcast [13 x i16]* %5 to i8*
|
||||
%7 = bitcast [7 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 4 %7, i32 26, i1 false)
|
||||
%8 = bitcast %struct.array13* %0 to i8*
|
||||
%9 = bitcast %struct.array13* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %8, i8* align 2 %9, i32 26, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo14(%struct.array14* noalias sret(%struct.array14) align 2 %0, [7 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array14, align 2
|
||||
%4 = getelementptr inbounds %struct.array14, %struct.array14* %3, i32 0, i32 0
|
||||
%5 = bitcast [14 x i16]* %4 to [7 x i32]*
|
||||
store [7 x i32] %1, [7 x i32]* %5, align 2
|
||||
%6 = bitcast %struct.array14* %0 to i8*
|
||||
%7 = bitcast %struct.array14* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 2 %7, i32 28, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo15(%struct.array15* noalias sret(%struct.array15) align 2 %0, [8 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array15, align 2
|
||||
%4 = alloca [8 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array15, %struct.array15* %3, i32 0, i32 0
|
||||
store [8 x i32] %1, [8 x i32]* %4, align 4
|
||||
%6 = bitcast [15 x i16]* %5 to i8*
|
||||
%7 = bitcast [8 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 4 %7, i32 30, i1 false)
|
||||
%8 = bitcast %struct.array15* %0 to i8*
|
||||
%9 = bitcast %struct.array15* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %8, i8* align 2 %9, i32 30, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo16(%struct.array16* noalias sret(%struct.array16) align 2 %0, [8 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array16, align 2
|
||||
%4 = getelementptr inbounds %struct.array16, %struct.array16* %3, i32 0, i32 0
|
||||
%5 = bitcast [16 x i16]* %4 to [8 x i32]*
|
||||
store [8 x i32] %1, [8 x i32]* %5, align 2
|
||||
%6 = bitcast %struct.array16* %0 to i8*
|
||||
%7 = bitcast %struct.array16* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 2 %7, i32 32, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo17(%struct.array17* noalias sret(%struct.array17) align 2 %0, [9 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array17, align 2
|
||||
%4 = alloca [9 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array17, %struct.array17* %3, i32 0, i32 0
|
||||
store [9 x i32] %1, [9 x i32]* %4, align 4
|
||||
%6 = bitcast [17 x i16]* %5 to i8*
|
||||
%7 = bitcast [9 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 4 %7, i32 34, i1 false)
|
||||
%8 = bitcast %struct.array17* %0 to i8*
|
||||
%9 = bitcast %struct.array17* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %8, i8* align 2 %9, i32 34, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo18(%struct.array18* noalias sret(%struct.array18) align 2 %0, [9 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array18, align 2
|
||||
%4 = getelementptr inbounds %struct.array18, %struct.array18* %3, i32 0, i32 0
|
||||
%5 = bitcast [18 x i16]* %4 to [9 x i32]*
|
||||
store [9 x i32] %1, [9 x i32]* %5, align 2
|
||||
%6 = bitcast %struct.array18* %0 to i8*
|
||||
%7 = bitcast %struct.array18* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 2 %7, i32 36, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo19(%struct.array19* noalias sret(%struct.array19) align 2 %0, [10 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array19, align 2
|
||||
%4 = alloca [10 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array19, %struct.array19* %3, i32 0, i32 0
|
||||
store [10 x i32] %1, [10 x i32]* %4, align 4
|
||||
%6 = bitcast [19 x i16]* %5 to i8*
|
||||
%7 = bitcast [10 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 4 %7, i32 38, i1 false)
|
||||
%8 = bitcast %struct.array19* %0 to i8*
|
||||
%9 = bitcast %struct.array19* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %8, i8* align 2 %9, i32 38, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo20(%struct.array20* noalias sret(%struct.array20) align 2 %0, [10 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array20, align 2
|
||||
%4 = getelementptr inbounds %struct.array20, %struct.array20* %3, i32 0, i32 0
|
||||
%5 = bitcast [20 x i16]* %4 to [10 x i32]*
|
||||
store [10 x i32] %1, [10 x i32]* %5, align 2
|
||||
%6 = bitcast %struct.array20* %0 to i8*
|
||||
%7 = bitcast %struct.array20* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 2 %7, i32 40, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="arm1176jzf-s" "target-features"="+armv6kz,+dsp,+fp64,+strict-align,+vfp2,+vfp2sp,-aes,-d32,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fullfp16,-neon,-sha2,-thumb-mode,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp" }
|
||||
attributes #1 = { argmemonly nofree nounwind willreturn }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!llvm.ident = !{!9}
|
||||
|
||||
!0 = !{i32 1, !"wchar_size", i32 4}
|
||||
!1 = !{i32 1, !"min_enum_size", i32 4}
|
||||
!2 = !{i32 8, !"branch-target-enforcement", i32 0}
|
||||
!3 = !{i32 8, !"sign-return-address", i32 0}
|
||||
!4 = !{i32 8, !"sign-return-address-all", i32 0}
|
||||
!5 = !{i32 8, !"sign-return-address-with-bkey", i32 0}
|
||||
!6 = !{i32 7, !"PIC Level", i32 2}
|
||||
!7 = !{i32 7, !"PIE Level", i32 2}
|
||||
!8 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!9 = !{!"Apple clang version 14.0.3 (clang-1403.0.22.14.1)"}
|
||||
257
internal/cabi/_testdata/arch/armv6/array_int32.ll
Normal file
257
internal/cabi/_testdata/arch/armv6/array_int32.ll
Normal file
@@ -0,0 +1,257 @@
|
||||
; ModuleID = '../../wrap/array_int32.c'
|
||||
source_filename = "../../wrap/array_int32.c"
|
||||
target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
target triple = "armv6kz-unknown-linux-gnueabihf"
|
||||
|
||||
%struct.array1 = type { [1 x i32] }
|
||||
%struct.array2 = type { [2 x i32] }
|
||||
%struct.array3 = type { [3 x i32] }
|
||||
%struct.array4 = type { [4 x i32] }
|
||||
%struct.array5 = type { [5 x i32] }
|
||||
%struct.array6 = type { [6 x i32] }
|
||||
%struct.array7 = type { [7 x i32] }
|
||||
%struct.array8 = type { [8 x i32] }
|
||||
%struct.array9 = type { [9 x i32] }
|
||||
%struct.array10 = type { [10 x i32] }
|
||||
%struct.array11 = type { [11 x i32] }
|
||||
%struct.array12 = type { [12 x i32] }
|
||||
%struct.array13 = type { [13 x i32] }
|
||||
%struct.array14 = type { [14 x i32] }
|
||||
%struct.array15 = type { [15 x i32] }
|
||||
%struct.array16 = type { [16 x i32] }
|
||||
%struct.array17 = type { [17 x i32] }
|
||||
%struct.array18 = type { [18 x i32] }
|
||||
%struct.array19 = type { [19 x i32] }
|
||||
%struct.array20 = type { [20 x i32] }
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local i32 @demo1([1 x i32] %0) #0 {
|
||||
%2 = alloca %struct.array1, align 4
|
||||
%3 = alloca %struct.array1, align 4
|
||||
%4 = getelementptr inbounds %struct.array1, %struct.array1* %3, i32 0, i32 0
|
||||
store [1 x i32] %0, [1 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.array1* %2 to i8*
|
||||
%6 = bitcast %struct.array1* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 4, i1 false)
|
||||
%7 = getelementptr inbounds %struct.array1, %struct.array1* %2, i32 0, i32 0
|
||||
%8 = bitcast [1 x i32]* %7 to i32*
|
||||
%9 = load i32, i32* %8, align 4
|
||||
ret i32 %9
|
||||
}
|
||||
|
||||
; Function Attrs: argmemonly nofree nounwind willreturn
|
||||
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i32, i1 immarg) #1
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo2(%struct.array2* noalias sret(%struct.array2) align 4 %0, [2 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array2, align 4
|
||||
%4 = getelementptr inbounds %struct.array2, %struct.array2* %3, i32 0, i32 0
|
||||
store [2 x i32] %1, [2 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.array2* %0 to i8*
|
||||
%6 = bitcast %struct.array2* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 8, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo3(%struct.array3* noalias sret(%struct.array3) align 4 %0, [3 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array3, align 4
|
||||
%4 = getelementptr inbounds %struct.array3, %struct.array3* %3, i32 0, i32 0
|
||||
store [3 x i32] %1, [3 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.array3* %0 to i8*
|
||||
%6 = bitcast %struct.array3* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 12, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo4(%struct.array4* noalias sret(%struct.array4) align 4 %0, [4 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array4, align 4
|
||||
%4 = getelementptr inbounds %struct.array4, %struct.array4* %3, i32 0, i32 0
|
||||
store [4 x i32] %1, [4 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.array4* %0 to i8*
|
||||
%6 = bitcast %struct.array4* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 16, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo5(%struct.array5* noalias sret(%struct.array5) align 4 %0, [5 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array5, align 4
|
||||
%4 = getelementptr inbounds %struct.array5, %struct.array5* %3, i32 0, i32 0
|
||||
store [5 x i32] %1, [5 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.array5* %0 to i8*
|
||||
%6 = bitcast %struct.array5* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 20, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo6(%struct.array6* noalias sret(%struct.array6) align 4 %0, [6 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array6, align 4
|
||||
%4 = getelementptr inbounds %struct.array6, %struct.array6* %3, i32 0, i32 0
|
||||
store [6 x i32] %1, [6 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.array6* %0 to i8*
|
||||
%6 = bitcast %struct.array6* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 24, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo7(%struct.array7* noalias sret(%struct.array7) align 4 %0, [7 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array7, align 4
|
||||
%4 = getelementptr inbounds %struct.array7, %struct.array7* %3, i32 0, i32 0
|
||||
store [7 x i32] %1, [7 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.array7* %0 to i8*
|
||||
%6 = bitcast %struct.array7* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 28, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo8(%struct.array8* noalias sret(%struct.array8) align 4 %0, [8 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array8, align 4
|
||||
%4 = getelementptr inbounds %struct.array8, %struct.array8* %3, i32 0, i32 0
|
||||
store [8 x i32] %1, [8 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.array8* %0 to i8*
|
||||
%6 = bitcast %struct.array8* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 32, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo9(%struct.array9* noalias sret(%struct.array9) align 4 %0, [9 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array9, align 4
|
||||
%4 = getelementptr inbounds %struct.array9, %struct.array9* %3, i32 0, i32 0
|
||||
store [9 x i32] %1, [9 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.array9* %0 to i8*
|
||||
%6 = bitcast %struct.array9* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 36, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo10(%struct.array10* noalias sret(%struct.array10) align 4 %0, [10 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array10, align 4
|
||||
%4 = getelementptr inbounds %struct.array10, %struct.array10* %3, i32 0, i32 0
|
||||
store [10 x i32] %1, [10 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.array10* %0 to i8*
|
||||
%6 = bitcast %struct.array10* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 40, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo11(%struct.array11* noalias sret(%struct.array11) align 4 %0, [11 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array11, align 4
|
||||
%4 = getelementptr inbounds %struct.array11, %struct.array11* %3, i32 0, i32 0
|
||||
store [11 x i32] %1, [11 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.array11* %0 to i8*
|
||||
%6 = bitcast %struct.array11* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 44, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo12(%struct.array12* noalias sret(%struct.array12) align 4 %0, [12 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array12, align 4
|
||||
%4 = getelementptr inbounds %struct.array12, %struct.array12* %3, i32 0, i32 0
|
||||
store [12 x i32] %1, [12 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.array12* %0 to i8*
|
||||
%6 = bitcast %struct.array12* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 48, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo13(%struct.array13* noalias sret(%struct.array13) align 4 %0, [13 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array13, align 4
|
||||
%4 = getelementptr inbounds %struct.array13, %struct.array13* %3, i32 0, i32 0
|
||||
store [13 x i32] %1, [13 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.array13* %0 to i8*
|
||||
%6 = bitcast %struct.array13* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 52, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo14(%struct.array14* noalias sret(%struct.array14) align 4 %0, [14 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array14, align 4
|
||||
%4 = getelementptr inbounds %struct.array14, %struct.array14* %3, i32 0, i32 0
|
||||
store [14 x i32] %1, [14 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.array14* %0 to i8*
|
||||
%6 = bitcast %struct.array14* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 56, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo15(%struct.array15* noalias sret(%struct.array15) align 4 %0, [15 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array15, align 4
|
||||
%4 = getelementptr inbounds %struct.array15, %struct.array15* %3, i32 0, i32 0
|
||||
store [15 x i32] %1, [15 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.array15* %0 to i8*
|
||||
%6 = bitcast %struct.array15* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 60, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo16(%struct.array16* noalias sret(%struct.array16) align 4 %0, [16 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array16, align 4
|
||||
%4 = getelementptr inbounds %struct.array16, %struct.array16* %3, i32 0, i32 0
|
||||
store [16 x i32] %1, [16 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.array16* %0 to i8*
|
||||
%6 = bitcast %struct.array16* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 64, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo17(%struct.array17* noalias sret(%struct.array17) align 4 %0, %struct.array17* noundef byval(%struct.array17) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.array17* %0 to i8*
|
||||
%4 = bitcast %struct.array17* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 68, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo18(%struct.array18* noalias sret(%struct.array18) align 4 %0, %struct.array18* noundef byval(%struct.array18) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.array18* %0 to i8*
|
||||
%4 = bitcast %struct.array18* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 72, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo19(%struct.array19* noalias sret(%struct.array19) align 4 %0, %struct.array19* noundef byval(%struct.array19) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.array19* %0 to i8*
|
||||
%4 = bitcast %struct.array19* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 76, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo20(%struct.array20* noalias sret(%struct.array20) align 4 %0, %struct.array20* noundef byval(%struct.array20) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.array20* %0 to i8*
|
||||
%4 = bitcast %struct.array20* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 80, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="arm1176jzf-s" "target-features"="+armv6kz,+dsp,+fp64,+strict-align,+vfp2,+vfp2sp,-aes,-d32,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fullfp16,-neon,-sha2,-thumb-mode,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp" }
|
||||
attributes #1 = { argmemonly nofree nounwind willreturn }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!llvm.ident = !{!9}
|
||||
|
||||
!0 = !{i32 1, !"wchar_size", i32 4}
|
||||
!1 = !{i32 1, !"min_enum_size", i32 4}
|
||||
!2 = !{i32 8, !"branch-target-enforcement", i32 0}
|
||||
!3 = !{i32 8, !"sign-return-address", i32 0}
|
||||
!4 = !{i32 8, !"sign-return-address-all", i32 0}
|
||||
!5 = !{i32 8, !"sign-return-address-with-bkey", i32 0}
|
||||
!6 = !{i32 7, !"PIC Level", i32 2}
|
||||
!7 = !{i32 7, !"PIE Level", i32 2}
|
||||
!8 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!9 = !{!"Apple clang version 14.0.3 (clang-1403.0.22.14.1)"}
|
||||
229
internal/cabi/_testdata/arch/armv6/array_int64.ll
Normal file
229
internal/cabi/_testdata/arch/armv6/array_int64.ll
Normal file
@@ -0,0 +1,229 @@
|
||||
; ModuleID = '../../wrap/array_int64.c'
|
||||
source_filename = "../../wrap/array_int64.c"
|
||||
target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
target triple = "armv6kz-unknown-linux-gnueabihf"
|
||||
|
||||
%struct.array1 = type { [1 x i64] }
|
||||
%struct.array2 = type { [2 x i64] }
|
||||
%struct.array3 = type { [3 x i64] }
|
||||
%struct.array4 = type { [4 x i64] }
|
||||
%struct.array5 = type { [5 x i64] }
|
||||
%struct.array6 = type { [6 x i64] }
|
||||
%struct.array7 = type { [7 x i64] }
|
||||
%struct.array8 = type { [8 x i64] }
|
||||
%struct.array9 = type { [9 x i64] }
|
||||
%struct.array10 = type { [10 x i64] }
|
||||
%struct.array11 = type { [11 x i64] }
|
||||
%struct.array12 = type { [12 x i64] }
|
||||
%struct.array13 = type { [13 x i64] }
|
||||
%struct.array14 = type { [14 x i64] }
|
||||
%struct.array15 = type { [15 x i64] }
|
||||
%struct.array16 = type { [16 x i64] }
|
||||
%struct.array17 = type { [17 x i64] }
|
||||
%struct.array18 = type { [18 x i64] }
|
||||
%struct.array19 = type { [19 x i64] }
|
||||
%struct.array20 = type { [20 x i64] }
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo1(%struct.array1* noalias sret(%struct.array1) align 8 %0, [1 x i64] %1) #0 {
|
||||
%3 = alloca %struct.array1, align 8
|
||||
%4 = getelementptr inbounds %struct.array1, %struct.array1* %3, i32 0, i32 0
|
||||
store [1 x i64] %1, [1 x i64]* %4, align 8
|
||||
%5 = bitcast %struct.array1* %0 to i8*
|
||||
%6 = bitcast %struct.array1* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %5, i8* align 8 %6, i32 8, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: argmemonly nofree nounwind willreturn
|
||||
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i32, i1 immarg) #1
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo2(%struct.array2* noalias sret(%struct.array2) align 8 %0, [2 x i64] %1) #0 {
|
||||
%3 = alloca %struct.array2, align 8
|
||||
%4 = getelementptr inbounds %struct.array2, %struct.array2* %3, i32 0, i32 0
|
||||
store [2 x i64] %1, [2 x i64]* %4, align 8
|
||||
%5 = bitcast %struct.array2* %0 to i8*
|
||||
%6 = bitcast %struct.array2* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %5, i8* align 8 %6, i32 16, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo3(%struct.array3* noalias sret(%struct.array3) align 8 %0, [3 x i64] %1) #0 {
|
||||
%3 = alloca %struct.array3, align 8
|
||||
%4 = getelementptr inbounds %struct.array3, %struct.array3* %3, i32 0, i32 0
|
||||
store [3 x i64] %1, [3 x i64]* %4, align 8
|
||||
%5 = bitcast %struct.array3* %0 to i8*
|
||||
%6 = bitcast %struct.array3* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %5, i8* align 8 %6, i32 24, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo4(%struct.array4* noalias sret(%struct.array4) align 8 %0, [4 x i64] %1) #0 {
|
||||
%3 = alloca %struct.array4, align 8
|
||||
%4 = getelementptr inbounds %struct.array4, %struct.array4* %3, i32 0, i32 0
|
||||
store [4 x i64] %1, [4 x i64]* %4, align 8
|
||||
%5 = bitcast %struct.array4* %0 to i8*
|
||||
%6 = bitcast %struct.array4* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %5, i8* align 8 %6, i32 32, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo5(%struct.array5* noalias sret(%struct.array5) align 8 %0, [5 x i64] %1) #0 {
|
||||
%3 = alloca %struct.array5, align 8
|
||||
%4 = getelementptr inbounds %struct.array5, %struct.array5* %3, i32 0, i32 0
|
||||
store [5 x i64] %1, [5 x i64]* %4, align 8
|
||||
%5 = bitcast %struct.array5* %0 to i8*
|
||||
%6 = bitcast %struct.array5* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %5, i8* align 8 %6, i32 40, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo6(%struct.array6* noalias sret(%struct.array6) align 8 %0, [6 x i64] %1) #0 {
|
||||
%3 = alloca %struct.array6, align 8
|
||||
%4 = getelementptr inbounds %struct.array6, %struct.array6* %3, i32 0, i32 0
|
||||
store [6 x i64] %1, [6 x i64]* %4, align 8
|
||||
%5 = bitcast %struct.array6* %0 to i8*
|
||||
%6 = bitcast %struct.array6* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %5, i8* align 8 %6, i32 48, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo7(%struct.array7* noalias sret(%struct.array7) align 8 %0, [7 x i64] %1) #0 {
|
||||
%3 = alloca %struct.array7, align 8
|
||||
%4 = getelementptr inbounds %struct.array7, %struct.array7* %3, i32 0, i32 0
|
||||
store [7 x i64] %1, [7 x i64]* %4, align 8
|
||||
%5 = bitcast %struct.array7* %0 to i8*
|
||||
%6 = bitcast %struct.array7* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %5, i8* align 8 %6, i32 56, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo8(%struct.array8* noalias sret(%struct.array8) align 8 %0, [8 x i64] %1) #0 {
|
||||
%3 = alloca %struct.array8, align 8
|
||||
%4 = getelementptr inbounds %struct.array8, %struct.array8* %3, i32 0, i32 0
|
||||
store [8 x i64] %1, [8 x i64]* %4, align 8
|
||||
%5 = bitcast %struct.array8* %0 to i8*
|
||||
%6 = bitcast %struct.array8* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %5, i8* align 8 %6, i32 64, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo9(%struct.array9* noalias sret(%struct.array9) align 8 %0, %struct.array9* noundef byval(%struct.array9) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array9* %0 to i8*
|
||||
%4 = bitcast %struct.array9* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 72, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo10(%struct.array10* noalias sret(%struct.array10) align 8 %0, %struct.array10* noundef byval(%struct.array10) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array10* %0 to i8*
|
||||
%4 = bitcast %struct.array10* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 80, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo11(%struct.array11* noalias sret(%struct.array11) align 8 %0, %struct.array11* noundef byval(%struct.array11) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array11* %0 to i8*
|
||||
%4 = bitcast %struct.array11* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 88, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo12(%struct.array12* noalias sret(%struct.array12) align 8 %0, %struct.array12* noundef byval(%struct.array12) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array12* %0 to i8*
|
||||
%4 = bitcast %struct.array12* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 96, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo13(%struct.array13* noalias sret(%struct.array13) align 8 %0, %struct.array13* noundef byval(%struct.array13) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array13* %0 to i8*
|
||||
%4 = bitcast %struct.array13* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 104, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo14(%struct.array14* noalias sret(%struct.array14) align 8 %0, %struct.array14* noundef byval(%struct.array14) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array14* %0 to i8*
|
||||
%4 = bitcast %struct.array14* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 112, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo15(%struct.array15* noalias sret(%struct.array15) align 8 %0, %struct.array15* noundef byval(%struct.array15) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array15* %0 to i8*
|
||||
%4 = bitcast %struct.array15* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 120, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo16(%struct.array16* noalias sret(%struct.array16) align 8 %0, %struct.array16* noundef byval(%struct.array16) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array16* %0 to i8*
|
||||
%4 = bitcast %struct.array16* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 128, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo17(%struct.array17* noalias sret(%struct.array17) align 8 %0, %struct.array17* noundef byval(%struct.array17) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array17* %0 to i8*
|
||||
%4 = bitcast %struct.array17* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 136, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo18(%struct.array18* noalias sret(%struct.array18) align 8 %0, %struct.array18* noundef byval(%struct.array18) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array18* %0 to i8*
|
||||
%4 = bitcast %struct.array18* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 144, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo19(%struct.array19* noalias sret(%struct.array19) align 8 %0, %struct.array19* noundef byval(%struct.array19) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array19* %0 to i8*
|
||||
%4 = bitcast %struct.array19* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 152, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo20(%struct.array20* noalias sret(%struct.array20) align 8 %0, %struct.array20* noundef byval(%struct.array20) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.array20* %0 to i8*
|
||||
%4 = bitcast %struct.array20* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 160, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="arm1176jzf-s" "target-features"="+armv6kz,+dsp,+fp64,+strict-align,+vfp2,+vfp2sp,-aes,-d32,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fullfp16,-neon,-sha2,-thumb-mode,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp" }
|
||||
attributes #1 = { argmemonly nofree nounwind willreturn }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!llvm.ident = !{!9}
|
||||
|
||||
!0 = !{i32 1, !"wchar_size", i32 4}
|
||||
!1 = !{i32 1, !"min_enum_size", i32 4}
|
||||
!2 = !{i32 8, !"branch-target-enforcement", i32 0}
|
||||
!3 = !{i32 8, !"sign-return-address", i32 0}
|
||||
!4 = !{i32 8, !"sign-return-address-all", i32 0}
|
||||
!5 = !{i32 8, !"sign-return-address-with-bkey", i32 0}
|
||||
!6 = !{i32 7, !"PIC Level", i32 2}
|
||||
!7 = !{i32 7, !"PIE Level", i32 2}
|
||||
!8 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!9 = !{!"Apple clang version 14.0.3 (clang-1403.0.22.14.1)"}
|
||||
349
internal/cabi/_testdata/arch/armv6/array_int8.ll
Normal file
349
internal/cabi/_testdata/arch/armv6/array_int8.ll
Normal file
@@ -0,0 +1,349 @@
|
||||
; ModuleID = '../../wrap/array_int8.c'
|
||||
source_filename = "../../wrap/array_int8.c"
|
||||
target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
target triple = "armv6kz-unknown-linux-gnueabihf"
|
||||
|
||||
%struct.array1 = type { [1 x i8] }
|
||||
%struct.array2 = type { [2 x i8] }
|
||||
%struct.array3 = type { [3 x i8] }
|
||||
%struct.array4 = type { [4 x i8] }
|
||||
%struct.array5 = type { [5 x i8] }
|
||||
%struct.array6 = type { [6 x i8] }
|
||||
%struct.array7 = type { [7 x i8] }
|
||||
%struct.array8 = type { [8 x i8] }
|
||||
%struct.array9 = type { [9 x i8] }
|
||||
%struct.array10 = type { [10 x i8] }
|
||||
%struct.array11 = type { [11 x i8] }
|
||||
%struct.array12 = type { [12 x i8] }
|
||||
%struct.array13 = type { [13 x i8] }
|
||||
%struct.array14 = type { [14 x i8] }
|
||||
%struct.array15 = type { [15 x i8] }
|
||||
%struct.array16 = type { [16 x i8] }
|
||||
%struct.array17 = type { [17 x i8] }
|
||||
%struct.array18 = type { [18 x i8] }
|
||||
%struct.array19 = type { [19 x i8] }
|
||||
%struct.array20 = type { [20 x i8] }
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local i8 @demo1([1 x i32] %0) #0 {
|
||||
%2 = alloca %struct.array1, align 1
|
||||
%3 = alloca %struct.array1, align 1
|
||||
%4 = alloca [1 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array1, %struct.array1* %3, i32 0, i32 0
|
||||
store [1 x i32] %0, [1 x i32]* %4, align 4
|
||||
%6 = bitcast [1 x i8]* %5 to i8*
|
||||
%7 = bitcast [1 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %6, i8* align 4 %7, i32 1, i1 false)
|
||||
%8 = bitcast %struct.array1* %2 to i8*
|
||||
%9 = bitcast %struct.array1* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %8, i8* align 1 %9, i32 1, i1 false)
|
||||
%10 = getelementptr inbounds %struct.array1, %struct.array1* %2, i32 0, i32 0
|
||||
%11 = bitcast [1 x i8]* %10 to i8*
|
||||
%12 = load i8, i8* %11, align 1
|
||||
ret i8 %12
|
||||
}
|
||||
|
||||
; Function Attrs: argmemonly nofree nounwind willreturn
|
||||
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i32, i1 immarg) #1
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local i16 @demo2([1 x i32] %0) #0 {
|
||||
%2 = alloca %struct.array2, align 1
|
||||
%3 = alloca %struct.array2, align 1
|
||||
%4 = alloca [1 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array2, %struct.array2* %3, i32 0, i32 0
|
||||
store [1 x i32] %0, [1 x i32]* %4, align 4
|
||||
%6 = bitcast [2 x i8]* %5 to i8*
|
||||
%7 = bitcast [1 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %6, i8* align 4 %7, i32 2, i1 false)
|
||||
%8 = bitcast %struct.array2* %2 to i8*
|
||||
%9 = bitcast %struct.array2* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %8, i8* align 1 %9, i32 2, i1 false)
|
||||
%10 = getelementptr inbounds %struct.array2, %struct.array2* %2, i32 0, i32 0
|
||||
%11 = bitcast [2 x i8]* %10 to i16*
|
||||
%12 = load i16, i16* %11, align 1
|
||||
ret i16 %12
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local i32 @demo3([1 x i32] %0) #0 {
|
||||
%2 = alloca %struct.array3, align 1
|
||||
%3 = alloca %struct.array3, align 1
|
||||
%4 = alloca [1 x i32], align 4
|
||||
%5 = alloca i32, align 4
|
||||
%6 = getelementptr inbounds %struct.array3, %struct.array3* %3, i32 0, i32 0
|
||||
store [1 x i32] %0, [1 x i32]* %4, align 4
|
||||
%7 = bitcast [3 x i8]* %6 to i8*
|
||||
%8 = bitcast [1 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %7, i8* align 4 %8, i32 3, i1 false)
|
||||
%9 = bitcast %struct.array3* %2 to i8*
|
||||
%10 = bitcast %struct.array3* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %9, i8* align 1 %10, i32 3, i1 false)
|
||||
%11 = getelementptr inbounds %struct.array3, %struct.array3* %2, i32 0, i32 0
|
||||
%12 = bitcast i32* %5 to i8*
|
||||
%13 = bitcast [3 x i8]* %11 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %12, i8* align 1 %13, i32 3, i1 false)
|
||||
%14 = load i32, i32* %5, align 4
|
||||
ret i32 %14
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local i32 @demo4([1 x i32] %0) #0 {
|
||||
%2 = alloca %struct.array4, align 1
|
||||
%3 = alloca %struct.array4, align 1
|
||||
%4 = getelementptr inbounds %struct.array4, %struct.array4* %3, i32 0, i32 0
|
||||
%5 = bitcast [4 x i8]* %4 to [1 x i32]*
|
||||
store [1 x i32] %0, [1 x i32]* %5, align 1
|
||||
%6 = bitcast %struct.array4* %2 to i8*
|
||||
%7 = bitcast %struct.array4* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %6, i8* align 1 %7, i32 4, i1 false)
|
||||
%8 = getelementptr inbounds %struct.array4, %struct.array4* %2, i32 0, i32 0
|
||||
%9 = bitcast [4 x i8]* %8 to i32*
|
||||
%10 = load i32, i32* %9, align 1
|
||||
ret i32 %10
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo5(%struct.array5* noalias sret(%struct.array5) align 1 %0, [2 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array5, align 1
|
||||
%4 = alloca [2 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array5, %struct.array5* %3, i32 0, i32 0
|
||||
store [2 x i32] %1, [2 x i32]* %4, align 4
|
||||
%6 = bitcast [5 x i8]* %5 to i8*
|
||||
%7 = bitcast [2 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %6, i8* align 4 %7, i32 5, i1 false)
|
||||
%8 = bitcast %struct.array5* %0 to i8*
|
||||
%9 = bitcast %struct.array5* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %8, i8* align 1 %9, i32 5, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo6(%struct.array6* noalias sret(%struct.array6) align 1 %0, [2 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array6, align 1
|
||||
%4 = alloca [2 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array6, %struct.array6* %3, i32 0, i32 0
|
||||
store [2 x i32] %1, [2 x i32]* %4, align 4
|
||||
%6 = bitcast [6 x i8]* %5 to i8*
|
||||
%7 = bitcast [2 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %6, i8* align 4 %7, i32 6, i1 false)
|
||||
%8 = bitcast %struct.array6* %0 to i8*
|
||||
%9 = bitcast %struct.array6* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %8, i8* align 1 %9, i32 6, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo7(%struct.array7* noalias sret(%struct.array7) align 1 %0, [2 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array7, align 1
|
||||
%4 = alloca [2 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array7, %struct.array7* %3, i32 0, i32 0
|
||||
store [2 x i32] %1, [2 x i32]* %4, align 4
|
||||
%6 = bitcast [7 x i8]* %5 to i8*
|
||||
%7 = bitcast [2 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %6, i8* align 4 %7, i32 7, i1 false)
|
||||
%8 = bitcast %struct.array7* %0 to i8*
|
||||
%9 = bitcast %struct.array7* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %8, i8* align 1 %9, i32 7, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo8(%struct.array8* noalias sret(%struct.array8) align 1 %0, [2 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array8, align 1
|
||||
%4 = getelementptr inbounds %struct.array8, %struct.array8* %3, i32 0, i32 0
|
||||
%5 = bitcast [8 x i8]* %4 to [2 x i32]*
|
||||
store [2 x i32] %1, [2 x i32]* %5, align 1
|
||||
%6 = bitcast %struct.array8* %0 to i8*
|
||||
%7 = bitcast %struct.array8* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %6, i8* align 1 %7, i32 8, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo9(%struct.array9* noalias sret(%struct.array9) align 1 %0, [3 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array9, align 1
|
||||
%4 = alloca [3 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array9, %struct.array9* %3, i32 0, i32 0
|
||||
store [3 x i32] %1, [3 x i32]* %4, align 4
|
||||
%6 = bitcast [9 x i8]* %5 to i8*
|
||||
%7 = bitcast [3 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %6, i8* align 4 %7, i32 9, i1 false)
|
||||
%8 = bitcast %struct.array9* %0 to i8*
|
||||
%9 = bitcast %struct.array9* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %8, i8* align 1 %9, i32 9, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo10(%struct.array10* noalias sret(%struct.array10) align 1 %0, [3 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array10, align 1
|
||||
%4 = alloca [3 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array10, %struct.array10* %3, i32 0, i32 0
|
||||
store [3 x i32] %1, [3 x i32]* %4, align 4
|
||||
%6 = bitcast [10 x i8]* %5 to i8*
|
||||
%7 = bitcast [3 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %6, i8* align 4 %7, i32 10, i1 false)
|
||||
%8 = bitcast %struct.array10* %0 to i8*
|
||||
%9 = bitcast %struct.array10* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %8, i8* align 1 %9, i32 10, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo11(%struct.array11* noalias sret(%struct.array11) align 1 %0, [3 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array11, align 1
|
||||
%4 = alloca [3 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array11, %struct.array11* %3, i32 0, i32 0
|
||||
store [3 x i32] %1, [3 x i32]* %4, align 4
|
||||
%6 = bitcast [11 x i8]* %5 to i8*
|
||||
%7 = bitcast [3 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %6, i8* align 4 %7, i32 11, i1 false)
|
||||
%8 = bitcast %struct.array11* %0 to i8*
|
||||
%9 = bitcast %struct.array11* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %8, i8* align 1 %9, i32 11, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo12(%struct.array12* noalias sret(%struct.array12) align 1 %0, [3 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array12, align 1
|
||||
%4 = getelementptr inbounds %struct.array12, %struct.array12* %3, i32 0, i32 0
|
||||
%5 = bitcast [12 x i8]* %4 to [3 x i32]*
|
||||
store [3 x i32] %1, [3 x i32]* %5, align 1
|
||||
%6 = bitcast %struct.array12* %0 to i8*
|
||||
%7 = bitcast %struct.array12* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %6, i8* align 1 %7, i32 12, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo13(%struct.array13* noalias sret(%struct.array13) align 1 %0, [4 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array13, align 1
|
||||
%4 = alloca [4 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array13, %struct.array13* %3, i32 0, i32 0
|
||||
store [4 x i32] %1, [4 x i32]* %4, align 4
|
||||
%6 = bitcast [13 x i8]* %5 to i8*
|
||||
%7 = bitcast [4 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %6, i8* align 4 %7, i32 13, i1 false)
|
||||
%8 = bitcast %struct.array13* %0 to i8*
|
||||
%9 = bitcast %struct.array13* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %8, i8* align 1 %9, i32 13, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo14(%struct.array14* noalias sret(%struct.array14) align 1 %0, [4 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array14, align 1
|
||||
%4 = alloca [4 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array14, %struct.array14* %3, i32 0, i32 0
|
||||
store [4 x i32] %1, [4 x i32]* %4, align 4
|
||||
%6 = bitcast [14 x i8]* %5 to i8*
|
||||
%7 = bitcast [4 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %6, i8* align 4 %7, i32 14, i1 false)
|
||||
%8 = bitcast %struct.array14* %0 to i8*
|
||||
%9 = bitcast %struct.array14* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %8, i8* align 1 %9, i32 14, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo15(%struct.array15* noalias sret(%struct.array15) align 1 %0, [4 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array15, align 1
|
||||
%4 = alloca [4 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array15, %struct.array15* %3, i32 0, i32 0
|
||||
store [4 x i32] %1, [4 x i32]* %4, align 4
|
||||
%6 = bitcast [15 x i8]* %5 to i8*
|
||||
%7 = bitcast [4 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %6, i8* align 4 %7, i32 15, i1 false)
|
||||
%8 = bitcast %struct.array15* %0 to i8*
|
||||
%9 = bitcast %struct.array15* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %8, i8* align 1 %9, i32 15, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo16(%struct.array16* noalias sret(%struct.array16) align 1 %0, [4 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array16, align 1
|
||||
%4 = getelementptr inbounds %struct.array16, %struct.array16* %3, i32 0, i32 0
|
||||
%5 = bitcast [16 x i8]* %4 to [4 x i32]*
|
||||
store [4 x i32] %1, [4 x i32]* %5, align 1
|
||||
%6 = bitcast %struct.array16* %0 to i8*
|
||||
%7 = bitcast %struct.array16* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %6, i8* align 1 %7, i32 16, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo17(%struct.array17* noalias sret(%struct.array17) align 1 %0, [5 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array17, align 1
|
||||
%4 = alloca [5 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array17, %struct.array17* %3, i32 0, i32 0
|
||||
store [5 x i32] %1, [5 x i32]* %4, align 4
|
||||
%6 = bitcast [17 x i8]* %5 to i8*
|
||||
%7 = bitcast [5 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %6, i8* align 4 %7, i32 17, i1 false)
|
||||
%8 = bitcast %struct.array17* %0 to i8*
|
||||
%9 = bitcast %struct.array17* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %8, i8* align 1 %9, i32 17, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo18(%struct.array18* noalias sret(%struct.array18) align 1 %0, [5 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array18, align 1
|
||||
%4 = alloca [5 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array18, %struct.array18* %3, i32 0, i32 0
|
||||
store [5 x i32] %1, [5 x i32]* %4, align 4
|
||||
%6 = bitcast [18 x i8]* %5 to i8*
|
||||
%7 = bitcast [5 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %6, i8* align 4 %7, i32 18, i1 false)
|
||||
%8 = bitcast %struct.array18* %0 to i8*
|
||||
%9 = bitcast %struct.array18* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %8, i8* align 1 %9, i32 18, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo19(%struct.array19* noalias sret(%struct.array19) align 1 %0, [5 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array19, align 1
|
||||
%4 = alloca [5 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.array19, %struct.array19* %3, i32 0, i32 0
|
||||
store [5 x i32] %1, [5 x i32]* %4, align 4
|
||||
%6 = bitcast [19 x i8]* %5 to i8*
|
||||
%7 = bitcast [5 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %6, i8* align 4 %7, i32 19, i1 false)
|
||||
%8 = bitcast %struct.array19* %0 to i8*
|
||||
%9 = bitcast %struct.array19* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %8, i8* align 1 %9, i32 19, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo20(%struct.array20* noalias sret(%struct.array20) align 1 %0, [5 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array20, align 1
|
||||
%4 = getelementptr inbounds %struct.array20, %struct.array20* %3, i32 0, i32 0
|
||||
%5 = bitcast [20 x i8]* %4 to [5 x i32]*
|
||||
store [5 x i32] %1, [5 x i32]* %5, align 1
|
||||
%6 = bitcast %struct.array20* %0 to i8*
|
||||
%7 = bitcast %struct.array20* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %6, i8* align 1 %7, i32 20, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="arm1176jzf-s" "target-features"="+armv6kz,+dsp,+fp64,+strict-align,+vfp2,+vfp2sp,-aes,-d32,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fullfp16,-neon,-sha2,-thumb-mode,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp" }
|
||||
attributes #1 = { argmemonly nofree nounwind willreturn }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!llvm.ident = !{!9}
|
||||
|
||||
!0 = !{i32 1, !"wchar_size", i32 4}
|
||||
!1 = !{i32 1, !"min_enum_size", i32 4}
|
||||
!2 = !{i32 8, !"branch-target-enforcement", i32 0}
|
||||
!3 = !{i32 8, !"sign-return-address", i32 0}
|
||||
!4 = !{i32 8, !"sign-return-address-all", i32 0}
|
||||
!5 = !{i32 8, !"sign-return-address-with-bkey", i32 0}
|
||||
!6 = !{i32 7, !"PIC Level", i32 2}
|
||||
!7 = !{i32 7, !"PIE Level", i32 2}
|
||||
!8 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!9 = !{!"Apple clang version 14.0.3 (clang-1403.0.22.14.1)"}
|
||||
273
internal/cabi/_testdata/arch/armv6/array_pointer.ll
Normal file
273
internal/cabi/_testdata/arch/armv6/array_pointer.ll
Normal file
@@ -0,0 +1,273 @@
|
||||
; ModuleID = '../../wrap/array_pointer.c'
|
||||
source_filename = "../../wrap/array_pointer.c"
|
||||
target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
target triple = "armv6kz-unknown-linux-gnueabihf"
|
||||
|
||||
%struct.array1 = type { [1 x i8*] }
|
||||
%struct.array2 = type { [2 x i8*] }
|
||||
%struct.array3 = type { [3 x i8*] }
|
||||
%struct.array4 = type { [4 x i8*] }
|
||||
%struct.array5 = type { [5 x i8*] }
|
||||
%struct.array6 = type { [6 x i8*] }
|
||||
%struct.array7 = type { [7 x i8*] }
|
||||
%struct.array8 = type { [8 x i8*] }
|
||||
%struct.array9 = type { [9 x i8*] }
|
||||
%struct.array10 = type { [10 x i8*] }
|
||||
%struct.array11 = type { [11 x i8*] }
|
||||
%struct.array12 = type { [12 x i8*] }
|
||||
%struct.array13 = type { [13 x i8*] }
|
||||
%struct.array14 = type { [14 x i8*] }
|
||||
%struct.array15 = type { [15 x i8*] }
|
||||
%struct.array16 = type { [16 x i8*] }
|
||||
%struct.array17 = type { [17 x i8*] }
|
||||
%struct.array18 = type { [18 x i8*] }
|
||||
%struct.array19 = type { [19 x i8*] }
|
||||
%struct.array20 = type { [20 x i8*] }
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local i32 @demo1([1 x i32] %0) #0 {
|
||||
%2 = alloca %struct.array1, align 4
|
||||
%3 = alloca %struct.array1, align 4
|
||||
%4 = getelementptr inbounds %struct.array1, %struct.array1* %3, i32 0, i32 0
|
||||
%5 = bitcast [1 x i8*]* %4 to [1 x i32]*
|
||||
store [1 x i32] %0, [1 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array1* %2 to i8*
|
||||
%7 = bitcast %struct.array1* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 4, i1 false)
|
||||
%8 = getelementptr inbounds %struct.array1, %struct.array1* %2, i32 0, i32 0
|
||||
%9 = bitcast [1 x i8*]* %8 to i32*
|
||||
%10 = load i32, i32* %9, align 4
|
||||
ret i32 %10
|
||||
}
|
||||
|
||||
; Function Attrs: argmemonly nofree nounwind willreturn
|
||||
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i32, i1 immarg) #1
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo2(%struct.array2* noalias sret(%struct.array2) align 4 %0, [2 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array2, align 4
|
||||
%4 = getelementptr inbounds %struct.array2, %struct.array2* %3, i32 0, i32 0
|
||||
%5 = bitcast [2 x i8*]* %4 to [2 x i32]*
|
||||
store [2 x i32] %1, [2 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array2* %0 to i8*
|
||||
%7 = bitcast %struct.array2* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 8, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo3(%struct.array3* noalias sret(%struct.array3) align 4 %0, [3 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array3, align 4
|
||||
%4 = getelementptr inbounds %struct.array3, %struct.array3* %3, i32 0, i32 0
|
||||
%5 = bitcast [3 x i8*]* %4 to [3 x i32]*
|
||||
store [3 x i32] %1, [3 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array3* %0 to i8*
|
||||
%7 = bitcast %struct.array3* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 12, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo4(%struct.array4* noalias sret(%struct.array4) align 4 %0, [4 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array4, align 4
|
||||
%4 = getelementptr inbounds %struct.array4, %struct.array4* %3, i32 0, i32 0
|
||||
%5 = bitcast [4 x i8*]* %4 to [4 x i32]*
|
||||
store [4 x i32] %1, [4 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array4* %0 to i8*
|
||||
%7 = bitcast %struct.array4* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 16, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo5(%struct.array5* noalias sret(%struct.array5) align 4 %0, [5 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array5, align 4
|
||||
%4 = getelementptr inbounds %struct.array5, %struct.array5* %3, i32 0, i32 0
|
||||
%5 = bitcast [5 x i8*]* %4 to [5 x i32]*
|
||||
store [5 x i32] %1, [5 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array5* %0 to i8*
|
||||
%7 = bitcast %struct.array5* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 20, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo6(%struct.array6* noalias sret(%struct.array6) align 4 %0, [6 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array6, align 4
|
||||
%4 = getelementptr inbounds %struct.array6, %struct.array6* %3, i32 0, i32 0
|
||||
%5 = bitcast [6 x i8*]* %4 to [6 x i32]*
|
||||
store [6 x i32] %1, [6 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array6* %0 to i8*
|
||||
%7 = bitcast %struct.array6* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 24, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo7(%struct.array7* noalias sret(%struct.array7) align 4 %0, [7 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array7, align 4
|
||||
%4 = getelementptr inbounds %struct.array7, %struct.array7* %3, i32 0, i32 0
|
||||
%5 = bitcast [7 x i8*]* %4 to [7 x i32]*
|
||||
store [7 x i32] %1, [7 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array7* %0 to i8*
|
||||
%7 = bitcast %struct.array7* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 28, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo8(%struct.array8* noalias sret(%struct.array8) align 4 %0, [8 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array8, align 4
|
||||
%4 = getelementptr inbounds %struct.array8, %struct.array8* %3, i32 0, i32 0
|
||||
%5 = bitcast [8 x i8*]* %4 to [8 x i32]*
|
||||
store [8 x i32] %1, [8 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array8* %0 to i8*
|
||||
%7 = bitcast %struct.array8* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 32, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo9(%struct.array9* noalias sret(%struct.array9) align 4 %0, [9 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array9, align 4
|
||||
%4 = getelementptr inbounds %struct.array9, %struct.array9* %3, i32 0, i32 0
|
||||
%5 = bitcast [9 x i8*]* %4 to [9 x i32]*
|
||||
store [9 x i32] %1, [9 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array9* %0 to i8*
|
||||
%7 = bitcast %struct.array9* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 36, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo10(%struct.array10* noalias sret(%struct.array10) align 4 %0, [10 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array10, align 4
|
||||
%4 = getelementptr inbounds %struct.array10, %struct.array10* %3, i32 0, i32 0
|
||||
%5 = bitcast [10 x i8*]* %4 to [10 x i32]*
|
||||
store [10 x i32] %1, [10 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array10* %0 to i8*
|
||||
%7 = bitcast %struct.array10* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 40, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo11(%struct.array11* noalias sret(%struct.array11) align 4 %0, [11 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array11, align 4
|
||||
%4 = getelementptr inbounds %struct.array11, %struct.array11* %3, i32 0, i32 0
|
||||
%5 = bitcast [11 x i8*]* %4 to [11 x i32]*
|
||||
store [11 x i32] %1, [11 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array11* %0 to i8*
|
||||
%7 = bitcast %struct.array11* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 44, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo12(%struct.array12* noalias sret(%struct.array12) align 4 %0, [12 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array12, align 4
|
||||
%4 = getelementptr inbounds %struct.array12, %struct.array12* %3, i32 0, i32 0
|
||||
%5 = bitcast [12 x i8*]* %4 to [12 x i32]*
|
||||
store [12 x i32] %1, [12 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array12* %0 to i8*
|
||||
%7 = bitcast %struct.array12* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 48, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo13(%struct.array13* noalias sret(%struct.array13) align 4 %0, [13 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array13, align 4
|
||||
%4 = getelementptr inbounds %struct.array13, %struct.array13* %3, i32 0, i32 0
|
||||
%5 = bitcast [13 x i8*]* %4 to [13 x i32]*
|
||||
store [13 x i32] %1, [13 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array13* %0 to i8*
|
||||
%7 = bitcast %struct.array13* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 52, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo14(%struct.array14* noalias sret(%struct.array14) align 4 %0, [14 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array14, align 4
|
||||
%4 = getelementptr inbounds %struct.array14, %struct.array14* %3, i32 0, i32 0
|
||||
%5 = bitcast [14 x i8*]* %4 to [14 x i32]*
|
||||
store [14 x i32] %1, [14 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array14* %0 to i8*
|
||||
%7 = bitcast %struct.array14* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 56, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo15(%struct.array15* noalias sret(%struct.array15) align 4 %0, [15 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array15, align 4
|
||||
%4 = getelementptr inbounds %struct.array15, %struct.array15* %3, i32 0, i32 0
|
||||
%5 = bitcast [15 x i8*]* %4 to [15 x i32]*
|
||||
store [15 x i32] %1, [15 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array15* %0 to i8*
|
||||
%7 = bitcast %struct.array15* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 60, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo16(%struct.array16* noalias sret(%struct.array16) align 4 %0, [16 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array16, align 4
|
||||
%4 = getelementptr inbounds %struct.array16, %struct.array16* %3, i32 0, i32 0
|
||||
%5 = bitcast [16 x i8*]* %4 to [16 x i32]*
|
||||
store [16 x i32] %1, [16 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array16* %0 to i8*
|
||||
%7 = bitcast %struct.array16* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 64, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo17(%struct.array17* noalias sret(%struct.array17) align 4 %0, %struct.array17* noundef byval(%struct.array17) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.array17* %0 to i8*
|
||||
%4 = bitcast %struct.array17* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 68, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo18(%struct.array18* noalias sret(%struct.array18) align 4 %0, %struct.array18* noundef byval(%struct.array18) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.array18* %0 to i8*
|
||||
%4 = bitcast %struct.array18* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 72, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo19(%struct.array19* noalias sret(%struct.array19) align 4 %0, %struct.array19* noundef byval(%struct.array19) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.array19* %0 to i8*
|
||||
%4 = bitcast %struct.array19* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 76, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo20(%struct.array20* noalias sret(%struct.array20) align 4 %0, %struct.array20* noundef byval(%struct.array20) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.array20* %0 to i8*
|
||||
%4 = bitcast %struct.array20* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 80, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="arm1176jzf-s" "target-features"="+armv6kz,+dsp,+fp64,+strict-align,+vfp2,+vfp2sp,-aes,-d32,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fullfp16,-neon,-sha2,-thumb-mode,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp" }
|
||||
attributes #1 = { argmemonly nofree nounwind willreturn }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!llvm.ident = !{!9}
|
||||
|
||||
!0 = !{i32 1, !"wchar_size", i32 4}
|
||||
!1 = !{i32 1, !"min_enum_size", i32 4}
|
||||
!2 = !{i32 8, !"branch-target-enforcement", i32 0}
|
||||
!3 = !{i32 8, !"sign-return-address", i32 0}
|
||||
!4 = !{i32 8, !"sign-return-address-all", i32 0}
|
||||
!5 = !{i32 8, !"sign-return-address-with-bkey", i32 0}
|
||||
!6 = !{i32 7, !"PIC Level", i32 2}
|
||||
!7 = !{i32 7, !"PIE Level", i32 2}
|
||||
!8 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!9 = !{!"Apple clang version 14.0.3 (clang-1403.0.22.14.1)"}
|
||||
273
internal/cabi/_testdata/arch/armv6/array_uintptr.ll
Normal file
273
internal/cabi/_testdata/arch/armv6/array_uintptr.ll
Normal file
@@ -0,0 +1,273 @@
|
||||
; ModuleID = '../../wrap/array_uintptr.c'
|
||||
source_filename = "../../wrap/array_uintptr.c"
|
||||
target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
target triple = "armv6kz-unknown-linux-gnueabihf"
|
||||
|
||||
%struct.array1 = type { [1 x i8*] }
|
||||
%struct.array2 = type { [2 x i8*] }
|
||||
%struct.array3 = type { [3 x i8*] }
|
||||
%struct.array4 = type { [4 x i8*] }
|
||||
%struct.array5 = type { [5 x i8*] }
|
||||
%struct.array6 = type { [6 x i8*] }
|
||||
%struct.array7 = type { [7 x i8*] }
|
||||
%struct.array8 = type { [8 x i8*] }
|
||||
%struct.array9 = type { [9 x i8*] }
|
||||
%struct.array10 = type { [10 x i8*] }
|
||||
%struct.array11 = type { [11 x i8*] }
|
||||
%struct.array12 = type { [12 x i8*] }
|
||||
%struct.array13 = type { [13 x i8*] }
|
||||
%struct.array14 = type { [14 x i8*] }
|
||||
%struct.array15 = type { [15 x i8*] }
|
||||
%struct.array16 = type { [16 x i8*] }
|
||||
%struct.array17 = type { [17 x i8*] }
|
||||
%struct.array18 = type { [18 x i8*] }
|
||||
%struct.array19 = type { [19 x i8*] }
|
||||
%struct.array20 = type { [20 x i8*] }
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local i32 @demo1([1 x i32] %0) #0 {
|
||||
%2 = alloca %struct.array1, align 4
|
||||
%3 = alloca %struct.array1, align 4
|
||||
%4 = getelementptr inbounds %struct.array1, %struct.array1* %3, i32 0, i32 0
|
||||
%5 = bitcast [1 x i8*]* %4 to [1 x i32]*
|
||||
store [1 x i32] %0, [1 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array1* %2 to i8*
|
||||
%7 = bitcast %struct.array1* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 4, i1 false)
|
||||
%8 = getelementptr inbounds %struct.array1, %struct.array1* %2, i32 0, i32 0
|
||||
%9 = bitcast [1 x i8*]* %8 to i32*
|
||||
%10 = load i32, i32* %9, align 4
|
||||
ret i32 %10
|
||||
}
|
||||
|
||||
; Function Attrs: argmemonly nofree nounwind willreturn
|
||||
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i32, i1 immarg) #1
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo2(%struct.array2* noalias sret(%struct.array2) align 4 %0, [2 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array2, align 4
|
||||
%4 = getelementptr inbounds %struct.array2, %struct.array2* %3, i32 0, i32 0
|
||||
%5 = bitcast [2 x i8*]* %4 to [2 x i32]*
|
||||
store [2 x i32] %1, [2 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array2* %0 to i8*
|
||||
%7 = bitcast %struct.array2* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 8, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo3(%struct.array3* noalias sret(%struct.array3) align 4 %0, [3 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array3, align 4
|
||||
%4 = getelementptr inbounds %struct.array3, %struct.array3* %3, i32 0, i32 0
|
||||
%5 = bitcast [3 x i8*]* %4 to [3 x i32]*
|
||||
store [3 x i32] %1, [3 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array3* %0 to i8*
|
||||
%7 = bitcast %struct.array3* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 12, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo4(%struct.array4* noalias sret(%struct.array4) align 4 %0, [4 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array4, align 4
|
||||
%4 = getelementptr inbounds %struct.array4, %struct.array4* %3, i32 0, i32 0
|
||||
%5 = bitcast [4 x i8*]* %4 to [4 x i32]*
|
||||
store [4 x i32] %1, [4 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array4* %0 to i8*
|
||||
%7 = bitcast %struct.array4* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 16, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo5(%struct.array5* noalias sret(%struct.array5) align 4 %0, [5 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array5, align 4
|
||||
%4 = getelementptr inbounds %struct.array5, %struct.array5* %3, i32 0, i32 0
|
||||
%5 = bitcast [5 x i8*]* %4 to [5 x i32]*
|
||||
store [5 x i32] %1, [5 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array5* %0 to i8*
|
||||
%7 = bitcast %struct.array5* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 20, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo6(%struct.array6* noalias sret(%struct.array6) align 4 %0, [6 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array6, align 4
|
||||
%4 = getelementptr inbounds %struct.array6, %struct.array6* %3, i32 0, i32 0
|
||||
%5 = bitcast [6 x i8*]* %4 to [6 x i32]*
|
||||
store [6 x i32] %1, [6 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array6* %0 to i8*
|
||||
%7 = bitcast %struct.array6* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 24, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo7(%struct.array7* noalias sret(%struct.array7) align 4 %0, [7 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array7, align 4
|
||||
%4 = getelementptr inbounds %struct.array7, %struct.array7* %3, i32 0, i32 0
|
||||
%5 = bitcast [7 x i8*]* %4 to [7 x i32]*
|
||||
store [7 x i32] %1, [7 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array7* %0 to i8*
|
||||
%7 = bitcast %struct.array7* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 28, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo8(%struct.array8* noalias sret(%struct.array8) align 4 %0, [8 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array8, align 4
|
||||
%4 = getelementptr inbounds %struct.array8, %struct.array8* %3, i32 0, i32 0
|
||||
%5 = bitcast [8 x i8*]* %4 to [8 x i32]*
|
||||
store [8 x i32] %1, [8 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array8* %0 to i8*
|
||||
%7 = bitcast %struct.array8* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 32, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo9(%struct.array9* noalias sret(%struct.array9) align 4 %0, [9 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array9, align 4
|
||||
%4 = getelementptr inbounds %struct.array9, %struct.array9* %3, i32 0, i32 0
|
||||
%5 = bitcast [9 x i8*]* %4 to [9 x i32]*
|
||||
store [9 x i32] %1, [9 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array9* %0 to i8*
|
||||
%7 = bitcast %struct.array9* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 36, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo10(%struct.array10* noalias sret(%struct.array10) align 4 %0, [10 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array10, align 4
|
||||
%4 = getelementptr inbounds %struct.array10, %struct.array10* %3, i32 0, i32 0
|
||||
%5 = bitcast [10 x i8*]* %4 to [10 x i32]*
|
||||
store [10 x i32] %1, [10 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array10* %0 to i8*
|
||||
%7 = bitcast %struct.array10* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 40, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo11(%struct.array11* noalias sret(%struct.array11) align 4 %0, [11 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array11, align 4
|
||||
%4 = getelementptr inbounds %struct.array11, %struct.array11* %3, i32 0, i32 0
|
||||
%5 = bitcast [11 x i8*]* %4 to [11 x i32]*
|
||||
store [11 x i32] %1, [11 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array11* %0 to i8*
|
||||
%7 = bitcast %struct.array11* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 44, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo12(%struct.array12* noalias sret(%struct.array12) align 4 %0, [12 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array12, align 4
|
||||
%4 = getelementptr inbounds %struct.array12, %struct.array12* %3, i32 0, i32 0
|
||||
%5 = bitcast [12 x i8*]* %4 to [12 x i32]*
|
||||
store [12 x i32] %1, [12 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array12* %0 to i8*
|
||||
%7 = bitcast %struct.array12* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 48, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo13(%struct.array13* noalias sret(%struct.array13) align 4 %0, [13 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array13, align 4
|
||||
%4 = getelementptr inbounds %struct.array13, %struct.array13* %3, i32 0, i32 0
|
||||
%5 = bitcast [13 x i8*]* %4 to [13 x i32]*
|
||||
store [13 x i32] %1, [13 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array13* %0 to i8*
|
||||
%7 = bitcast %struct.array13* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 52, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo14(%struct.array14* noalias sret(%struct.array14) align 4 %0, [14 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array14, align 4
|
||||
%4 = getelementptr inbounds %struct.array14, %struct.array14* %3, i32 0, i32 0
|
||||
%5 = bitcast [14 x i8*]* %4 to [14 x i32]*
|
||||
store [14 x i32] %1, [14 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array14* %0 to i8*
|
||||
%7 = bitcast %struct.array14* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 56, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo15(%struct.array15* noalias sret(%struct.array15) align 4 %0, [15 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array15, align 4
|
||||
%4 = getelementptr inbounds %struct.array15, %struct.array15* %3, i32 0, i32 0
|
||||
%5 = bitcast [15 x i8*]* %4 to [15 x i32]*
|
||||
store [15 x i32] %1, [15 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array15* %0 to i8*
|
||||
%7 = bitcast %struct.array15* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 60, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo16(%struct.array16* noalias sret(%struct.array16) align 4 %0, [16 x i32] %1) #0 {
|
||||
%3 = alloca %struct.array16, align 4
|
||||
%4 = getelementptr inbounds %struct.array16, %struct.array16* %3, i32 0, i32 0
|
||||
%5 = bitcast [16 x i8*]* %4 to [16 x i32]*
|
||||
store [16 x i32] %1, [16 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.array16* %0 to i8*
|
||||
%7 = bitcast %struct.array16* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 64, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo17(%struct.array17* noalias sret(%struct.array17) align 4 %0, %struct.array17* noundef byval(%struct.array17) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.array17* %0 to i8*
|
||||
%4 = bitcast %struct.array17* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 68, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo18(%struct.array18* noalias sret(%struct.array18) align 4 %0, %struct.array18* noundef byval(%struct.array18) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.array18* %0 to i8*
|
||||
%4 = bitcast %struct.array18* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 72, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo19(%struct.array19* noalias sret(%struct.array19) align 4 %0, %struct.array19* noundef byval(%struct.array19) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.array19* %0 to i8*
|
||||
%4 = bitcast %struct.array19* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 76, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo20(%struct.array20* noalias sret(%struct.array20) align 4 %0, %struct.array20* noundef byval(%struct.array20) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.array20* %0 to i8*
|
||||
%4 = bitcast %struct.array20* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 80, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="arm1176jzf-s" "target-features"="+armv6kz,+dsp,+fp64,+strict-align,+vfp2,+vfp2sp,-aes,-d32,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fullfp16,-neon,-sha2,-thumb-mode,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp" }
|
||||
attributes #1 = { argmemonly nofree nounwind willreturn }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!llvm.ident = !{!9}
|
||||
|
||||
!0 = !{i32 1, !"wchar_size", i32 4}
|
||||
!1 = !{i32 1, !"min_enum_size", i32 4}
|
||||
!2 = !{i32 8, !"branch-target-enforcement", i32 0}
|
||||
!3 = !{i32 8, !"sign-return-address", i32 0}
|
||||
!4 = !{i32 8, !"sign-return-address-all", i32 0}
|
||||
!5 = !{i32 8, !"sign-return-address-with-bkey", i32 0}
|
||||
!6 = !{i32 7, !"PIC Level", i32 2}
|
||||
!7 = !{i32 7, !"PIE Level", i32 2}
|
||||
!8 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!9 = !{!"Apple clang version 14.0.3 (clang-1403.0.22.14.1)"}
|
||||
76
internal/cabi/_testdata/arch/armv6/basic.ll
Normal file
76
internal/cabi/_testdata/arch/armv6/basic.ll
Normal file
@@ -0,0 +1,76 @@
|
||||
; ModuleID = '../../wrap/basic.c'
|
||||
source_filename = "../../wrap/basic.c"
|
||||
target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
target triple = "armv6kz-unknown-linux-gnueabihf"
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local zeroext i8 @basic_int8(i8 noundef zeroext %0) #0 {
|
||||
%2 = alloca i8, align 1
|
||||
store i8 %0, i8* %2, align 1
|
||||
%3 = load i8, i8* %2, align 1
|
||||
ret i8 %3
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local signext i16 @basic_int16(i16 noundef signext %0) #0 {
|
||||
%2 = alloca i16, align 2
|
||||
store i16 %0, i16* %2, align 2
|
||||
%3 = load i16, i16* %2, align 2
|
||||
ret i16 %3
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local i32 @basic_int32(i32 noundef %0) #0 {
|
||||
%2 = alloca i32, align 4
|
||||
store i32 %0, i32* %2, align 4
|
||||
%3 = load i32, i32* %2, align 4
|
||||
ret i32 %3
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local i64 @basic_int64(i64 noundef %0) #0 {
|
||||
%2 = alloca i64, align 8
|
||||
store i64 %0, i64* %2, align 8
|
||||
%3 = load i64, i64* %2, align 8
|
||||
ret i64 %3
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local float @basic_float32(float noundef %0) #0 {
|
||||
%2 = alloca float, align 4
|
||||
store float %0, float* %2, align 4
|
||||
%3 = load float, float* %2, align 4
|
||||
ret float %3
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local double @basic_float64(double noundef %0) #0 {
|
||||
%2 = alloca double, align 8
|
||||
store double %0, double* %2, align 8
|
||||
%3 = load double, double* %2, align 8
|
||||
ret double %3
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local i8* @basic_uintptr(i8* noundef %0) #0 {
|
||||
%2 = alloca i8*, align 4
|
||||
store i8* %0, i8** %2, align 4
|
||||
%3 = load i8*, i8** %2, align 4
|
||||
ret i8* %3
|
||||
}
|
||||
|
||||
attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="arm1176jzf-s" "target-features"="+armv6kz,+dsp,+fp64,+strict-align,+vfp2,+vfp2sp,-aes,-d32,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fullfp16,-neon,-sha2,-thumb-mode,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp" }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!llvm.ident = !{!9}
|
||||
|
||||
!0 = !{i32 1, !"wchar_size", i32 4}
|
||||
!1 = !{i32 1, !"min_enum_size", i32 4}
|
||||
!2 = !{i32 8, !"branch-target-enforcement", i32 0}
|
||||
!3 = !{i32 8, !"sign-return-address", i32 0}
|
||||
!4 = !{i32 8, !"sign-return-address-all", i32 0}
|
||||
!5 = !{i32 8, !"sign-return-address-with-bkey", i32 0}
|
||||
!6 = !{i32 7, !"PIC Level", i32 2}
|
||||
!7 = !{i32 7, !"PIE Level", i32 2}
|
||||
!8 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!9 = !{!"Apple clang version 14.0.3 (clang-1403.0.22.14.1)"}
|
||||
257
internal/cabi/_testdata/arch/armv6/struct_float32.ll
Normal file
257
internal/cabi/_testdata/arch/armv6/struct_float32.ll
Normal file
@@ -0,0 +1,257 @@
|
||||
; ModuleID = '../../wrap/struct_float32.c'
|
||||
source_filename = "../../wrap/struct_float32.c"
|
||||
target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
target triple = "armv6kz-unknown-linux-gnueabihf"
|
||||
|
||||
%struct.point1 = type { float }
|
||||
%struct.point2 = type { float, float }
|
||||
%struct.point3 = type { float, float, float }
|
||||
%struct.point4 = type { float, float, float, float }
|
||||
%struct.point5 = type { float, float, float, float, float }
|
||||
%struct.point6 = type { float, float, float, float, float, float }
|
||||
%struct.point7 = type { float, float, float, float, float, float, float }
|
||||
%struct.point8 = type { float, float, float, float, float, float, float, float }
|
||||
%struct.point9 = type { float, float, float, float, float, float, float, float, float }
|
||||
%struct.point10 = type { float, float, float, float, float, float, float, float, float, float }
|
||||
%struct.point11 = type { float, float, float, float, float, float, float, float, float, float, float }
|
||||
%struct.point12 = type { float, float, float, float, float, float, float, float, float, float, float, float }
|
||||
%struct.point13 = type { float, float, float, float, float, float, float, float, float, float, float, float, float }
|
||||
%struct.point14 = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float }
|
||||
%struct.point15 = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }
|
||||
%struct.point16 = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }
|
||||
%struct.point17 = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }
|
||||
%struct.point18 = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }
|
||||
%struct.point19 = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }
|
||||
%struct.point20 = type { float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local %struct.point1 @demo1(%struct.point1 %0) #0 {
|
||||
%2 = alloca %struct.point1, align 4
|
||||
%3 = alloca %struct.point1, align 4
|
||||
store %struct.point1 %0, %struct.point1* %3, align 4
|
||||
%4 = bitcast %struct.point1* %2 to i8*
|
||||
%5 = bitcast %struct.point1* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %4, i8* align 4 %5, i32 4, i1 false)
|
||||
%6 = load %struct.point1, %struct.point1* %2, align 4
|
||||
ret %struct.point1 %6
|
||||
}
|
||||
|
||||
; Function Attrs: argmemonly nofree nounwind willreturn
|
||||
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i32, i1 immarg) #1
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local %struct.point2 @demo2(%struct.point2 %0) #0 {
|
||||
%2 = alloca %struct.point2, align 4
|
||||
%3 = alloca %struct.point2, align 4
|
||||
store %struct.point2 %0, %struct.point2* %3, align 4
|
||||
%4 = bitcast %struct.point2* %2 to i8*
|
||||
%5 = bitcast %struct.point2* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %4, i8* align 4 %5, i32 8, i1 false)
|
||||
%6 = load %struct.point2, %struct.point2* %2, align 4
|
||||
ret %struct.point2 %6
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local %struct.point3 @demo3(%struct.point3 %0) #0 {
|
||||
%2 = alloca %struct.point3, align 4
|
||||
%3 = alloca %struct.point3, align 4
|
||||
store %struct.point3 %0, %struct.point3* %3, align 4
|
||||
%4 = bitcast %struct.point3* %2 to i8*
|
||||
%5 = bitcast %struct.point3* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %4, i8* align 4 %5, i32 12, i1 false)
|
||||
%6 = load %struct.point3, %struct.point3* %2, align 4
|
||||
ret %struct.point3 %6
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local %struct.point4 @demo4(%struct.point4 %0) #0 {
|
||||
%2 = alloca %struct.point4, align 4
|
||||
%3 = alloca %struct.point4, align 4
|
||||
store %struct.point4 %0, %struct.point4* %3, align 4
|
||||
%4 = bitcast %struct.point4* %2 to i8*
|
||||
%5 = bitcast %struct.point4* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %4, i8* align 4 %5, i32 16, i1 false)
|
||||
%6 = load %struct.point4, %struct.point4* %2, align 4
|
||||
ret %struct.point4 %6
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo5(%struct.point5* noalias sret(%struct.point5) align 4 %0, [5 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point5, align 4
|
||||
%4 = bitcast %struct.point5* %3 to [5 x i32]*
|
||||
store [5 x i32] %1, [5 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point5* %0 to i8*
|
||||
%6 = bitcast %struct.point5* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 20, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo6(%struct.point6* noalias sret(%struct.point6) align 4 %0, [6 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point6, align 4
|
||||
%4 = bitcast %struct.point6* %3 to [6 x i32]*
|
||||
store [6 x i32] %1, [6 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point6* %0 to i8*
|
||||
%6 = bitcast %struct.point6* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 24, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo7(%struct.point7* noalias sret(%struct.point7) align 4 %0, [7 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point7, align 4
|
||||
%4 = bitcast %struct.point7* %3 to [7 x i32]*
|
||||
store [7 x i32] %1, [7 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point7* %0 to i8*
|
||||
%6 = bitcast %struct.point7* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 28, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo8(%struct.point8* noalias sret(%struct.point8) align 4 %0, [8 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point8, align 4
|
||||
%4 = bitcast %struct.point8* %3 to [8 x i32]*
|
||||
store [8 x i32] %1, [8 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point8* %0 to i8*
|
||||
%6 = bitcast %struct.point8* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 32, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo9(%struct.point9* noalias sret(%struct.point9) align 4 %0, [9 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point9, align 4
|
||||
%4 = bitcast %struct.point9* %3 to [9 x i32]*
|
||||
store [9 x i32] %1, [9 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point9* %0 to i8*
|
||||
%6 = bitcast %struct.point9* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 36, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo10(%struct.point10* noalias sret(%struct.point10) align 4 %0, [10 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point10, align 4
|
||||
%4 = bitcast %struct.point10* %3 to [10 x i32]*
|
||||
store [10 x i32] %1, [10 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point10* %0 to i8*
|
||||
%6 = bitcast %struct.point10* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 40, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo11(%struct.point11* noalias sret(%struct.point11) align 4 %0, [11 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point11, align 4
|
||||
%4 = bitcast %struct.point11* %3 to [11 x i32]*
|
||||
store [11 x i32] %1, [11 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point11* %0 to i8*
|
||||
%6 = bitcast %struct.point11* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 44, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo12(%struct.point12* noalias sret(%struct.point12) align 4 %0, [12 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point12, align 4
|
||||
%4 = bitcast %struct.point12* %3 to [12 x i32]*
|
||||
store [12 x i32] %1, [12 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point12* %0 to i8*
|
||||
%6 = bitcast %struct.point12* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 48, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo13(%struct.point13* noalias sret(%struct.point13) align 4 %0, [13 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point13, align 4
|
||||
%4 = bitcast %struct.point13* %3 to [13 x i32]*
|
||||
store [13 x i32] %1, [13 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point13* %0 to i8*
|
||||
%6 = bitcast %struct.point13* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 52, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo14(%struct.point14* noalias sret(%struct.point14) align 4 %0, [14 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point14, align 4
|
||||
%4 = bitcast %struct.point14* %3 to [14 x i32]*
|
||||
store [14 x i32] %1, [14 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point14* %0 to i8*
|
||||
%6 = bitcast %struct.point14* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 56, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo15(%struct.point15* noalias sret(%struct.point15) align 4 %0, [15 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point15, align 4
|
||||
%4 = bitcast %struct.point15* %3 to [15 x i32]*
|
||||
store [15 x i32] %1, [15 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point15* %0 to i8*
|
||||
%6 = bitcast %struct.point15* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 60, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo16(%struct.point16* noalias sret(%struct.point16) align 4 %0, [16 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point16, align 4
|
||||
%4 = bitcast %struct.point16* %3 to [16 x i32]*
|
||||
store [16 x i32] %1, [16 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point16* %0 to i8*
|
||||
%6 = bitcast %struct.point16* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 64, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo17(%struct.point17* noalias sret(%struct.point17) align 4 %0, %struct.point17* noundef byval(%struct.point17) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.point17* %0 to i8*
|
||||
%4 = bitcast %struct.point17* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 68, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo18(%struct.point18* noalias sret(%struct.point18) align 4 %0, %struct.point18* noundef byval(%struct.point18) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.point18* %0 to i8*
|
||||
%4 = bitcast %struct.point18* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 72, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo19(%struct.point19* noalias sret(%struct.point19) align 4 %0, %struct.point19* noundef byval(%struct.point19) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.point19* %0 to i8*
|
||||
%4 = bitcast %struct.point19* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 76, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo20(%struct.point20* noalias sret(%struct.point20) align 4 %0, %struct.point20* noundef byval(%struct.point20) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.point20* %0 to i8*
|
||||
%4 = bitcast %struct.point20* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 80, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="arm1176jzf-s" "target-features"="+armv6kz,+dsp,+fp64,+strict-align,+vfp2,+vfp2sp,-aes,-d32,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fullfp16,-neon,-sha2,-thumb-mode,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp" }
|
||||
attributes #1 = { argmemonly nofree nounwind willreturn }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!llvm.ident = !{!9}
|
||||
|
||||
!0 = !{i32 1, !"wchar_size", i32 4}
|
||||
!1 = !{i32 1, !"min_enum_size", i32 4}
|
||||
!2 = !{i32 8, !"branch-target-enforcement", i32 0}
|
||||
!3 = !{i32 8, !"sign-return-address", i32 0}
|
||||
!4 = !{i32 8, !"sign-return-address-all", i32 0}
|
||||
!5 = !{i32 8, !"sign-return-address-with-bkey", i32 0}
|
||||
!6 = !{i32 7, !"PIC Level", i32 2}
|
||||
!7 = !{i32 7, !"PIE Level", i32 2}
|
||||
!8 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!9 = !{!"Apple clang version 14.0.3 (clang-1403.0.22.14.1)"}
|
||||
233
internal/cabi/_testdata/arch/armv6/struct_float64.ll
Normal file
233
internal/cabi/_testdata/arch/armv6/struct_float64.ll
Normal file
@@ -0,0 +1,233 @@
|
||||
; ModuleID = '../../wrap/struct_float64.c'
|
||||
source_filename = "../../wrap/struct_float64.c"
|
||||
target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
target triple = "armv6kz-unknown-linux-gnueabihf"
|
||||
|
||||
%struct.point1 = type { double }
|
||||
%struct.point2 = type { double, double }
|
||||
%struct.point3 = type { double, double, double }
|
||||
%struct.point4 = type { double, double, double, double }
|
||||
%struct.point5 = type { double, double, double, double, double }
|
||||
%struct.point6 = type { double, double, double, double, double, double }
|
||||
%struct.point7 = type { double, double, double, double, double, double, double }
|
||||
%struct.point8 = type { double, double, double, double, double, double, double, double }
|
||||
%struct.point9 = type { double, double, double, double, double, double, double, double, double }
|
||||
%struct.point10 = type { double, double, double, double, double, double, double, double, double, double }
|
||||
%struct.point11 = type { double, double, double, double, double, double, double, double, double, double, double }
|
||||
%struct.point12 = type { double, double, double, double, double, double, double, double, double, double, double, double }
|
||||
%struct.point13 = type { double, double, double, double, double, double, double, double, double, double, double, double, double }
|
||||
%struct.point14 = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double }
|
||||
%struct.point15 = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double, double }
|
||||
%struct.point16 = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double }
|
||||
%struct.point17 = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double }
|
||||
%struct.point18 = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double }
|
||||
%struct.point19 = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double }
|
||||
%struct.point20 = type { double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double }
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local %struct.point1 @demo1(%struct.point1 %0) #0 {
|
||||
%2 = alloca %struct.point1, align 8
|
||||
%3 = alloca %struct.point1, align 8
|
||||
store %struct.point1 %0, %struct.point1* %3, align 8
|
||||
%4 = bitcast %struct.point1* %2 to i8*
|
||||
%5 = bitcast %struct.point1* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %4, i8* align 8 %5, i32 8, i1 false)
|
||||
%6 = load %struct.point1, %struct.point1* %2, align 8
|
||||
ret %struct.point1 %6
|
||||
}
|
||||
|
||||
; Function Attrs: argmemonly nofree nounwind willreturn
|
||||
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i32, i1 immarg) #1
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local %struct.point2 @demo2(%struct.point2 %0) #0 {
|
||||
%2 = alloca %struct.point2, align 8
|
||||
%3 = alloca %struct.point2, align 8
|
||||
store %struct.point2 %0, %struct.point2* %3, align 8
|
||||
%4 = bitcast %struct.point2* %2 to i8*
|
||||
%5 = bitcast %struct.point2* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %4, i8* align 8 %5, i32 16, i1 false)
|
||||
%6 = load %struct.point2, %struct.point2* %2, align 8
|
||||
ret %struct.point2 %6
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local %struct.point3 @demo3(%struct.point3 %0) #0 {
|
||||
%2 = alloca %struct.point3, align 8
|
||||
%3 = alloca %struct.point3, align 8
|
||||
store %struct.point3 %0, %struct.point3* %3, align 8
|
||||
%4 = bitcast %struct.point3* %2 to i8*
|
||||
%5 = bitcast %struct.point3* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %4, i8* align 8 %5, i32 24, i1 false)
|
||||
%6 = load %struct.point3, %struct.point3* %2, align 8
|
||||
ret %struct.point3 %6
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local %struct.point4 @demo4(%struct.point4 %0) #0 {
|
||||
%2 = alloca %struct.point4, align 8
|
||||
%3 = alloca %struct.point4, align 8
|
||||
store %struct.point4 %0, %struct.point4* %3, align 8
|
||||
%4 = bitcast %struct.point4* %2 to i8*
|
||||
%5 = bitcast %struct.point4* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %4, i8* align 8 %5, i32 32, i1 false)
|
||||
%6 = load %struct.point4, %struct.point4* %2, align 8
|
||||
ret %struct.point4 %6
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo5(%struct.point5* noalias sret(%struct.point5) align 8 %0, [5 x i64] %1) #0 {
|
||||
%3 = alloca %struct.point5, align 8
|
||||
%4 = bitcast %struct.point5* %3 to [5 x i64]*
|
||||
store [5 x i64] %1, [5 x i64]* %4, align 8
|
||||
%5 = bitcast %struct.point5* %0 to i8*
|
||||
%6 = bitcast %struct.point5* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %5, i8* align 8 %6, i32 40, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo6(%struct.point6* noalias sret(%struct.point6) align 8 %0, [6 x i64] %1) #0 {
|
||||
%3 = alloca %struct.point6, align 8
|
||||
%4 = bitcast %struct.point6* %3 to [6 x i64]*
|
||||
store [6 x i64] %1, [6 x i64]* %4, align 8
|
||||
%5 = bitcast %struct.point6* %0 to i8*
|
||||
%6 = bitcast %struct.point6* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %5, i8* align 8 %6, i32 48, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo7(%struct.point7* noalias sret(%struct.point7) align 8 %0, [7 x i64] %1) #0 {
|
||||
%3 = alloca %struct.point7, align 8
|
||||
%4 = bitcast %struct.point7* %3 to [7 x i64]*
|
||||
store [7 x i64] %1, [7 x i64]* %4, align 8
|
||||
%5 = bitcast %struct.point7* %0 to i8*
|
||||
%6 = bitcast %struct.point7* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %5, i8* align 8 %6, i32 56, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo8(%struct.point8* noalias sret(%struct.point8) align 8 %0, [8 x i64] %1) #0 {
|
||||
%3 = alloca %struct.point8, align 8
|
||||
%4 = bitcast %struct.point8* %3 to [8 x i64]*
|
||||
store [8 x i64] %1, [8 x i64]* %4, align 8
|
||||
%5 = bitcast %struct.point8* %0 to i8*
|
||||
%6 = bitcast %struct.point8* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %5, i8* align 8 %6, i32 64, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo9(%struct.point9* noalias sret(%struct.point9) align 8 %0, %struct.point9* noundef byval(%struct.point9) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point9* %0 to i8*
|
||||
%4 = bitcast %struct.point9* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 72, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo10(%struct.point10* noalias sret(%struct.point10) align 8 %0, %struct.point10* noundef byval(%struct.point10) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point10* %0 to i8*
|
||||
%4 = bitcast %struct.point10* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 80, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo11(%struct.point11* noalias sret(%struct.point11) align 8 %0, %struct.point11* noundef byval(%struct.point11) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point11* %0 to i8*
|
||||
%4 = bitcast %struct.point11* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 88, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo12(%struct.point12* noalias sret(%struct.point12) align 8 %0, %struct.point12* noundef byval(%struct.point12) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point12* %0 to i8*
|
||||
%4 = bitcast %struct.point12* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 96, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo13(%struct.point13* noalias sret(%struct.point13) align 8 %0, %struct.point13* noundef byval(%struct.point13) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point13* %0 to i8*
|
||||
%4 = bitcast %struct.point13* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 104, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo14(%struct.point14* noalias sret(%struct.point14) align 8 %0, %struct.point14* noundef byval(%struct.point14) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point14* %0 to i8*
|
||||
%4 = bitcast %struct.point14* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 112, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo15(%struct.point15* noalias sret(%struct.point15) align 8 %0, %struct.point15* noundef byval(%struct.point15) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point15* %0 to i8*
|
||||
%4 = bitcast %struct.point15* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 120, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo16(%struct.point16* noalias sret(%struct.point16) align 8 %0, %struct.point16* noundef byval(%struct.point16) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point16* %0 to i8*
|
||||
%4 = bitcast %struct.point16* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 128, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo17(%struct.point17* noalias sret(%struct.point17) align 8 %0, %struct.point17* noundef byval(%struct.point17) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point17* %0 to i8*
|
||||
%4 = bitcast %struct.point17* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 136, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo18(%struct.point18* noalias sret(%struct.point18) align 8 %0, %struct.point18* noundef byval(%struct.point18) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point18* %0 to i8*
|
||||
%4 = bitcast %struct.point18* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 144, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo19(%struct.point19* noalias sret(%struct.point19) align 8 %0, %struct.point19* noundef byval(%struct.point19) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point19* %0 to i8*
|
||||
%4 = bitcast %struct.point19* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 152, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo20(%struct.point20* noalias sret(%struct.point20) align 8 %0, %struct.point20* noundef byval(%struct.point20) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point20* %0 to i8*
|
||||
%4 = bitcast %struct.point20* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 160, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="arm1176jzf-s" "target-features"="+armv6kz,+dsp,+fp64,+strict-align,+vfp2,+vfp2sp,-aes,-d32,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fullfp16,-neon,-sha2,-thumb-mode,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp" }
|
||||
attributes #1 = { argmemonly nofree nounwind willreturn }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!llvm.ident = !{!9}
|
||||
|
||||
!0 = !{i32 1, !"wchar_size", i32 4}
|
||||
!1 = !{i32 1, !"min_enum_size", i32 4}
|
||||
!2 = !{i32 8, !"branch-target-enforcement", i32 0}
|
||||
!3 = !{i32 8, !"sign-return-address", i32 0}
|
||||
!4 = !{i32 8, !"sign-return-address-all", i32 0}
|
||||
!5 = !{i32 8, !"sign-return-address-with-bkey", i32 0}
|
||||
!6 = !{i32 7, !"PIC Level", i32 2}
|
||||
!7 = !{i32 7, !"PIE Level", i32 2}
|
||||
!8 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!9 = !{!"Apple clang version 14.0.3 (clang-1403.0.22.14.1)"}
|
||||
302
internal/cabi/_testdata/arch/armv6/struct_int16.ll
Normal file
302
internal/cabi/_testdata/arch/armv6/struct_int16.ll
Normal file
@@ -0,0 +1,302 @@
|
||||
; ModuleID = '../../wrap/struct_int16.c'
|
||||
source_filename = "../../wrap/struct_int16.c"
|
||||
target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
target triple = "armv6kz-unknown-linux-gnueabihf"
|
||||
|
||||
%struct.point1 = type { i16 }
|
||||
%struct.point2 = type { i16, i16 }
|
||||
%struct.point3 = type { i16, i16, i16 }
|
||||
%struct.point4 = type { i16, i16, i16, i16 }
|
||||
%struct.point5 = type { i16, i16, i16, i16, i16 }
|
||||
%struct.point6 = type { i16, i16, i16, i16, i16, i16 }
|
||||
%struct.point7 = type { i16, i16, i16, i16, i16, i16, i16 }
|
||||
%struct.point8 = type { i16, i16, i16, i16, i16, i16, i16, i16 }
|
||||
%struct.point9 = type { i16, i16, i16, i16, i16, i16, i16, i16, i16 }
|
||||
%struct.point10 = type { i16, i16, i16, i16, i16, i16, i16, i16, i16, i16 }
|
||||
%struct.point11 = type { i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16 }
|
||||
%struct.point12 = type { i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16 }
|
||||
%struct.point13 = type { i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16 }
|
||||
%struct.point14 = type { i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16 }
|
||||
%struct.point15 = type { i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16 }
|
||||
%struct.point16 = type { i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16 }
|
||||
%struct.point17 = type { i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16 }
|
||||
%struct.point18 = type { i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16 }
|
||||
%struct.point19 = type { i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16 }
|
||||
%struct.point20 = type { i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16, i16 }
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local i16 @demo1([1 x i32] %0) #0 {
|
||||
%2 = alloca %struct.point1, align 2
|
||||
%3 = alloca %struct.point1, align 2
|
||||
%4 = alloca [1 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.point1, %struct.point1* %3, i32 0, i32 0
|
||||
store [1 x i32] %0, [1 x i32]* %4, align 4
|
||||
%6 = bitcast i16* %5 to i8*
|
||||
%7 = bitcast [1 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %6, i8* align 4 %7, i32 2, i1 false)
|
||||
%8 = bitcast %struct.point1* %2 to i8*
|
||||
%9 = bitcast %struct.point1* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %8, i8* align 2 %9, i32 2, i1 false)
|
||||
%10 = getelementptr inbounds %struct.point1, %struct.point1* %2, i32 0, i32 0
|
||||
%11 = load i16, i16* %10, align 2
|
||||
ret i16 %11
|
||||
}
|
||||
|
||||
; Function Attrs: argmemonly nofree nounwind willreturn
|
||||
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i32, i1 immarg) #1
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local i32 @demo2([1 x i32] %0) #0 {
|
||||
%2 = alloca %struct.point2, align 2
|
||||
%3 = alloca %struct.point2, align 2
|
||||
%4 = bitcast %struct.point2* %3 to [1 x i32]*
|
||||
store [1 x i32] %0, [1 x i32]* %4, align 2
|
||||
%5 = bitcast %struct.point2* %2 to i8*
|
||||
%6 = bitcast %struct.point2* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %5, i8* align 2 %6, i32 4, i1 false)
|
||||
%7 = bitcast %struct.point2* %2 to i32*
|
||||
%8 = load i32, i32* %7, align 2
|
||||
ret i32 %8
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo3(%struct.point3* noalias sret(%struct.point3) align 2 %0, [2 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point3, align 2
|
||||
%4 = alloca [2 x i32], align 4
|
||||
store [2 x i32] %1, [2 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point3* %3 to i8*
|
||||
%6 = bitcast [2 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %5, i8* align 4 %6, i32 6, i1 false)
|
||||
%7 = bitcast %struct.point3* %0 to i8*
|
||||
%8 = bitcast %struct.point3* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %7, i8* align 2 %8, i32 6, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo4(%struct.point4* noalias sret(%struct.point4) align 2 %0, [2 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point4, align 2
|
||||
%4 = bitcast %struct.point4* %3 to [2 x i32]*
|
||||
store [2 x i32] %1, [2 x i32]* %4, align 2
|
||||
%5 = bitcast %struct.point4* %0 to i8*
|
||||
%6 = bitcast %struct.point4* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %5, i8* align 2 %6, i32 8, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo5(%struct.point5* noalias sret(%struct.point5) align 2 %0, [3 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point5, align 2
|
||||
%4 = alloca [3 x i32], align 4
|
||||
store [3 x i32] %1, [3 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point5* %3 to i8*
|
||||
%6 = bitcast [3 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %5, i8* align 4 %6, i32 10, i1 false)
|
||||
%7 = bitcast %struct.point5* %0 to i8*
|
||||
%8 = bitcast %struct.point5* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %7, i8* align 2 %8, i32 10, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo6(%struct.point6* noalias sret(%struct.point6) align 2 %0, [3 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point6, align 2
|
||||
%4 = bitcast %struct.point6* %3 to [3 x i32]*
|
||||
store [3 x i32] %1, [3 x i32]* %4, align 2
|
||||
%5 = bitcast %struct.point6* %0 to i8*
|
||||
%6 = bitcast %struct.point6* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %5, i8* align 2 %6, i32 12, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo7(%struct.point7* noalias sret(%struct.point7) align 2 %0, [4 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point7, align 2
|
||||
%4 = alloca [4 x i32], align 4
|
||||
store [4 x i32] %1, [4 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point7* %3 to i8*
|
||||
%6 = bitcast [4 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %5, i8* align 4 %6, i32 14, i1 false)
|
||||
%7 = bitcast %struct.point7* %0 to i8*
|
||||
%8 = bitcast %struct.point7* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %7, i8* align 2 %8, i32 14, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo8(%struct.point8* noalias sret(%struct.point8) align 2 %0, [4 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point8, align 2
|
||||
%4 = bitcast %struct.point8* %3 to [4 x i32]*
|
||||
store [4 x i32] %1, [4 x i32]* %4, align 2
|
||||
%5 = bitcast %struct.point8* %0 to i8*
|
||||
%6 = bitcast %struct.point8* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %5, i8* align 2 %6, i32 16, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo9(%struct.point9* noalias sret(%struct.point9) align 2 %0, [5 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point9, align 2
|
||||
%4 = alloca [5 x i32], align 4
|
||||
store [5 x i32] %1, [5 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point9* %3 to i8*
|
||||
%6 = bitcast [5 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %5, i8* align 4 %6, i32 18, i1 false)
|
||||
%7 = bitcast %struct.point9* %0 to i8*
|
||||
%8 = bitcast %struct.point9* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %7, i8* align 2 %8, i32 18, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo10(%struct.point10* noalias sret(%struct.point10) align 2 %0, [5 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point10, align 2
|
||||
%4 = bitcast %struct.point10* %3 to [5 x i32]*
|
||||
store [5 x i32] %1, [5 x i32]* %4, align 2
|
||||
%5 = bitcast %struct.point10* %0 to i8*
|
||||
%6 = bitcast %struct.point10* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %5, i8* align 2 %6, i32 20, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo11(%struct.point11* noalias sret(%struct.point11) align 2 %0, [6 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point11, align 2
|
||||
%4 = alloca [6 x i32], align 4
|
||||
store [6 x i32] %1, [6 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point11* %3 to i8*
|
||||
%6 = bitcast [6 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %5, i8* align 4 %6, i32 22, i1 false)
|
||||
%7 = bitcast %struct.point11* %0 to i8*
|
||||
%8 = bitcast %struct.point11* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %7, i8* align 2 %8, i32 22, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo12(%struct.point12* noalias sret(%struct.point12) align 2 %0, [6 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point12, align 2
|
||||
%4 = bitcast %struct.point12* %3 to [6 x i32]*
|
||||
store [6 x i32] %1, [6 x i32]* %4, align 2
|
||||
%5 = bitcast %struct.point12* %0 to i8*
|
||||
%6 = bitcast %struct.point12* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %5, i8* align 2 %6, i32 24, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo13(%struct.point13* noalias sret(%struct.point13) align 2 %0, [7 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point13, align 2
|
||||
%4 = alloca [7 x i32], align 4
|
||||
store [7 x i32] %1, [7 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point13* %3 to i8*
|
||||
%6 = bitcast [7 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %5, i8* align 4 %6, i32 26, i1 false)
|
||||
%7 = bitcast %struct.point13* %0 to i8*
|
||||
%8 = bitcast %struct.point13* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %7, i8* align 2 %8, i32 26, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo14(%struct.point14* noalias sret(%struct.point14) align 2 %0, [7 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point14, align 2
|
||||
%4 = bitcast %struct.point14* %3 to [7 x i32]*
|
||||
store [7 x i32] %1, [7 x i32]* %4, align 2
|
||||
%5 = bitcast %struct.point14* %0 to i8*
|
||||
%6 = bitcast %struct.point14* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %5, i8* align 2 %6, i32 28, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo15(%struct.point15* noalias sret(%struct.point15) align 2 %0, [8 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point15, align 2
|
||||
%4 = alloca [8 x i32], align 4
|
||||
store [8 x i32] %1, [8 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point15* %3 to i8*
|
||||
%6 = bitcast [8 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %5, i8* align 4 %6, i32 30, i1 false)
|
||||
%7 = bitcast %struct.point15* %0 to i8*
|
||||
%8 = bitcast %struct.point15* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %7, i8* align 2 %8, i32 30, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo16(%struct.point16* noalias sret(%struct.point16) align 2 %0, [8 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point16, align 2
|
||||
%4 = bitcast %struct.point16* %3 to [8 x i32]*
|
||||
store [8 x i32] %1, [8 x i32]* %4, align 2
|
||||
%5 = bitcast %struct.point16* %0 to i8*
|
||||
%6 = bitcast %struct.point16* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %5, i8* align 2 %6, i32 32, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo17(%struct.point17* noalias sret(%struct.point17) align 2 %0, [9 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point17, align 2
|
||||
%4 = alloca [9 x i32], align 4
|
||||
store [9 x i32] %1, [9 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point17* %3 to i8*
|
||||
%6 = bitcast [9 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %5, i8* align 4 %6, i32 34, i1 false)
|
||||
%7 = bitcast %struct.point17* %0 to i8*
|
||||
%8 = bitcast %struct.point17* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %7, i8* align 2 %8, i32 34, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo18(%struct.point18* noalias sret(%struct.point18) align 2 %0, [9 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point18, align 2
|
||||
%4 = bitcast %struct.point18* %3 to [9 x i32]*
|
||||
store [9 x i32] %1, [9 x i32]* %4, align 2
|
||||
%5 = bitcast %struct.point18* %0 to i8*
|
||||
%6 = bitcast %struct.point18* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %5, i8* align 2 %6, i32 36, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo19(%struct.point19* noalias sret(%struct.point19) align 2 %0, [10 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point19, align 2
|
||||
%4 = alloca [10 x i32], align 4
|
||||
store [10 x i32] %1, [10 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point19* %3 to i8*
|
||||
%6 = bitcast [10 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %5, i8* align 4 %6, i32 38, i1 false)
|
||||
%7 = bitcast %struct.point19* %0 to i8*
|
||||
%8 = bitcast %struct.point19* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %7, i8* align 2 %8, i32 38, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo20(%struct.point20* noalias sret(%struct.point20) align 2 %0, [10 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point20, align 2
|
||||
%4 = bitcast %struct.point20* %3 to [10 x i32]*
|
||||
store [10 x i32] %1, [10 x i32]* %4, align 2
|
||||
%5 = bitcast %struct.point20* %0 to i8*
|
||||
%6 = bitcast %struct.point20* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 2 %5, i8* align 2 %6, i32 40, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="arm1176jzf-s" "target-features"="+armv6kz,+dsp,+fp64,+strict-align,+vfp2,+vfp2sp,-aes,-d32,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fullfp16,-neon,-sha2,-thumb-mode,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp" }
|
||||
attributes #1 = { argmemonly nofree nounwind willreturn }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!llvm.ident = !{!9}
|
||||
|
||||
!0 = !{i32 1, !"wchar_size", i32 4}
|
||||
!1 = !{i32 1, !"min_enum_size", i32 4}
|
||||
!2 = !{i32 8, !"branch-target-enforcement", i32 0}
|
||||
!3 = !{i32 8, !"sign-return-address", i32 0}
|
||||
!4 = !{i32 8, !"sign-return-address-all", i32 0}
|
||||
!5 = !{i32 8, !"sign-return-address-with-bkey", i32 0}
|
||||
!6 = !{i32 7, !"PIC Level", i32 2}
|
||||
!7 = !{i32 7, !"PIE Level", i32 2}
|
||||
!8 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!9 = !{!"Apple clang version 14.0.3 (clang-1403.0.22.14.1)"}
|
||||
257
internal/cabi/_testdata/arch/armv6/struct_int32.ll
Normal file
257
internal/cabi/_testdata/arch/armv6/struct_int32.ll
Normal file
@@ -0,0 +1,257 @@
|
||||
; ModuleID = '../../wrap/struct_int32.c'
|
||||
source_filename = "../../wrap/struct_int32.c"
|
||||
target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
target triple = "armv6kz-unknown-linux-gnueabihf"
|
||||
|
||||
%struct.point1 = type { i32 }
|
||||
%struct.point2 = type { i32, i32 }
|
||||
%struct.point3 = type { i32, i32, i32 }
|
||||
%struct.point4 = type { i32, i32, i32, i32 }
|
||||
%struct.point5 = type { i32, i32, i32, i32, i32 }
|
||||
%struct.point6 = type { i32, i32, i32, i32, i32, i32 }
|
||||
%struct.point7 = type { i32, i32, i32, i32, i32, i32, i32 }
|
||||
%struct.point8 = type { i32, i32, i32, i32, i32, i32, i32, i32 }
|
||||
%struct.point9 = type { i32, i32, i32, i32, i32, i32, i32, i32, i32 }
|
||||
%struct.point10 = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
|
||||
%struct.point11 = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
|
||||
%struct.point12 = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
|
||||
%struct.point13 = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
|
||||
%struct.point14 = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
|
||||
%struct.point15 = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
|
||||
%struct.point16 = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
|
||||
%struct.point17 = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
|
||||
%struct.point18 = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
|
||||
%struct.point19 = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
|
||||
%struct.point20 = type { i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32 }
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local i32 @demo1([1 x i32] %0) #0 {
|
||||
%2 = alloca %struct.point1, align 4
|
||||
%3 = alloca %struct.point1, align 4
|
||||
%4 = getelementptr inbounds %struct.point1, %struct.point1* %3, i32 0, i32 0
|
||||
%5 = bitcast i32* %4 to [1 x i32]*
|
||||
store [1 x i32] %0, [1 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.point1* %2 to i8*
|
||||
%7 = bitcast %struct.point1* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 4, i1 false)
|
||||
%8 = getelementptr inbounds %struct.point1, %struct.point1* %2, i32 0, i32 0
|
||||
%9 = load i32, i32* %8, align 4
|
||||
ret i32 %9
|
||||
}
|
||||
|
||||
; Function Attrs: argmemonly nofree nounwind willreturn
|
||||
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i32, i1 immarg) #1
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo2(%struct.point2* noalias sret(%struct.point2) align 4 %0, [2 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point2, align 4
|
||||
%4 = bitcast %struct.point2* %3 to [2 x i32]*
|
||||
store [2 x i32] %1, [2 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point2* %0 to i8*
|
||||
%6 = bitcast %struct.point2* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 8, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo3(%struct.point3* noalias sret(%struct.point3) align 4 %0, [3 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point3, align 4
|
||||
%4 = bitcast %struct.point3* %3 to [3 x i32]*
|
||||
store [3 x i32] %1, [3 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point3* %0 to i8*
|
||||
%6 = bitcast %struct.point3* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 12, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo4(%struct.point4* noalias sret(%struct.point4) align 4 %0, [4 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point4, align 4
|
||||
%4 = bitcast %struct.point4* %3 to [4 x i32]*
|
||||
store [4 x i32] %1, [4 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point4* %0 to i8*
|
||||
%6 = bitcast %struct.point4* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 16, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo5(%struct.point5* noalias sret(%struct.point5) align 4 %0, [5 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point5, align 4
|
||||
%4 = bitcast %struct.point5* %3 to [5 x i32]*
|
||||
store [5 x i32] %1, [5 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point5* %0 to i8*
|
||||
%6 = bitcast %struct.point5* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 20, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo6(%struct.point6* noalias sret(%struct.point6) align 4 %0, [6 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point6, align 4
|
||||
%4 = bitcast %struct.point6* %3 to [6 x i32]*
|
||||
store [6 x i32] %1, [6 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point6* %0 to i8*
|
||||
%6 = bitcast %struct.point6* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 24, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo7(%struct.point7* noalias sret(%struct.point7) align 4 %0, [7 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point7, align 4
|
||||
%4 = bitcast %struct.point7* %3 to [7 x i32]*
|
||||
store [7 x i32] %1, [7 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point7* %0 to i8*
|
||||
%6 = bitcast %struct.point7* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 28, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo8(%struct.point8* noalias sret(%struct.point8) align 4 %0, [8 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point8, align 4
|
||||
%4 = bitcast %struct.point8* %3 to [8 x i32]*
|
||||
store [8 x i32] %1, [8 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point8* %0 to i8*
|
||||
%6 = bitcast %struct.point8* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 32, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo9(%struct.point9* noalias sret(%struct.point9) align 4 %0, [9 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point9, align 4
|
||||
%4 = bitcast %struct.point9* %3 to [9 x i32]*
|
||||
store [9 x i32] %1, [9 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point9* %0 to i8*
|
||||
%6 = bitcast %struct.point9* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 36, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo10(%struct.point10* noalias sret(%struct.point10) align 4 %0, [10 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point10, align 4
|
||||
%4 = bitcast %struct.point10* %3 to [10 x i32]*
|
||||
store [10 x i32] %1, [10 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point10* %0 to i8*
|
||||
%6 = bitcast %struct.point10* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 40, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo11(%struct.point11* noalias sret(%struct.point11) align 4 %0, [11 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point11, align 4
|
||||
%4 = bitcast %struct.point11* %3 to [11 x i32]*
|
||||
store [11 x i32] %1, [11 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point11* %0 to i8*
|
||||
%6 = bitcast %struct.point11* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 44, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo12(%struct.point12* noalias sret(%struct.point12) align 4 %0, [12 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point12, align 4
|
||||
%4 = bitcast %struct.point12* %3 to [12 x i32]*
|
||||
store [12 x i32] %1, [12 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point12* %0 to i8*
|
||||
%6 = bitcast %struct.point12* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 48, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo13(%struct.point13* noalias sret(%struct.point13) align 4 %0, [13 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point13, align 4
|
||||
%4 = bitcast %struct.point13* %3 to [13 x i32]*
|
||||
store [13 x i32] %1, [13 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point13* %0 to i8*
|
||||
%6 = bitcast %struct.point13* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 52, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo14(%struct.point14* noalias sret(%struct.point14) align 4 %0, [14 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point14, align 4
|
||||
%4 = bitcast %struct.point14* %3 to [14 x i32]*
|
||||
store [14 x i32] %1, [14 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point14* %0 to i8*
|
||||
%6 = bitcast %struct.point14* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 56, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo15(%struct.point15* noalias sret(%struct.point15) align 4 %0, [15 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point15, align 4
|
||||
%4 = bitcast %struct.point15* %3 to [15 x i32]*
|
||||
store [15 x i32] %1, [15 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point15* %0 to i8*
|
||||
%6 = bitcast %struct.point15* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 60, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo16(%struct.point16* noalias sret(%struct.point16) align 4 %0, [16 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point16, align 4
|
||||
%4 = bitcast %struct.point16* %3 to [16 x i32]*
|
||||
store [16 x i32] %1, [16 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point16* %0 to i8*
|
||||
%6 = bitcast %struct.point16* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 64, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo17(%struct.point17* noalias sret(%struct.point17) align 4 %0, %struct.point17* noundef byval(%struct.point17) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.point17* %0 to i8*
|
||||
%4 = bitcast %struct.point17* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 68, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo18(%struct.point18* noalias sret(%struct.point18) align 4 %0, %struct.point18* noundef byval(%struct.point18) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.point18* %0 to i8*
|
||||
%4 = bitcast %struct.point18* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 72, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo19(%struct.point19* noalias sret(%struct.point19) align 4 %0, %struct.point19* noundef byval(%struct.point19) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.point19* %0 to i8*
|
||||
%4 = bitcast %struct.point19* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 76, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo20(%struct.point20* noalias sret(%struct.point20) align 4 %0, %struct.point20* noundef byval(%struct.point20) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.point20* %0 to i8*
|
||||
%4 = bitcast %struct.point20* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 80, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="arm1176jzf-s" "target-features"="+armv6kz,+dsp,+fp64,+strict-align,+vfp2,+vfp2sp,-aes,-d32,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fullfp16,-neon,-sha2,-thumb-mode,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp" }
|
||||
attributes #1 = { argmemonly nofree nounwind willreturn }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!llvm.ident = !{!9}
|
||||
|
||||
!0 = !{i32 1, !"wchar_size", i32 4}
|
||||
!1 = !{i32 1, !"min_enum_size", i32 4}
|
||||
!2 = !{i32 8, !"branch-target-enforcement", i32 0}
|
||||
!3 = !{i32 8, !"sign-return-address", i32 0}
|
||||
!4 = !{i32 8, !"sign-return-address-all", i32 0}
|
||||
!5 = !{i32 8, !"sign-return-address-with-bkey", i32 0}
|
||||
!6 = !{i32 7, !"PIC Level", i32 2}
|
||||
!7 = !{i32 7, !"PIE Level", i32 2}
|
||||
!8 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!9 = !{!"Apple clang version 14.0.3 (clang-1403.0.22.14.1)"}
|
||||
230
internal/cabi/_testdata/arch/armv6/struct_int64.ll
Normal file
230
internal/cabi/_testdata/arch/armv6/struct_int64.ll
Normal file
@@ -0,0 +1,230 @@
|
||||
; ModuleID = '../../wrap/struct_int64.c'
|
||||
source_filename = "../../wrap/struct_int64.c"
|
||||
target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
target triple = "armv6kz-unknown-linux-gnueabihf"
|
||||
|
||||
%struct.point1 = type { i64 }
|
||||
%struct.point2 = type { i64, i64 }
|
||||
%struct.point3 = type { i64, i64, i64 }
|
||||
%struct.point4 = type { i64, i64, i64, i64 }
|
||||
%struct.point5 = type { i64, i64, i64, i64, i64 }
|
||||
%struct.point6 = type { i64, i64, i64, i64, i64, i64 }
|
||||
%struct.point7 = type { i64, i64, i64, i64, i64, i64, i64 }
|
||||
%struct.point8 = type { i64, i64, i64, i64, i64, i64, i64, i64 }
|
||||
%struct.point9 = type { i64, i64, i64, i64, i64, i64, i64, i64, i64 }
|
||||
%struct.point10 = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
|
||||
%struct.point11 = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
|
||||
%struct.point12 = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
|
||||
%struct.point13 = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
|
||||
%struct.point14 = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
|
||||
%struct.point15 = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
|
||||
%struct.point16 = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
|
||||
%struct.point17 = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
|
||||
%struct.point18 = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
|
||||
%struct.point19 = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
|
||||
%struct.point20 = type { i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64, i64 }
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo1(%struct.point1* noalias sret(%struct.point1) align 8 %0, [1 x i64] %1) #0 {
|
||||
%3 = alloca %struct.point1, align 8
|
||||
%4 = getelementptr inbounds %struct.point1, %struct.point1* %3, i32 0, i32 0
|
||||
%5 = bitcast i64* %4 to [1 x i64]*
|
||||
store [1 x i64] %1, [1 x i64]* %5, align 8
|
||||
%6 = bitcast %struct.point1* %0 to i8*
|
||||
%7 = bitcast %struct.point1* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %6, i8* align 8 %7, i32 8, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: argmemonly nofree nounwind willreturn
|
||||
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i32, i1 immarg) #1
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo2(%struct.point2* noalias sret(%struct.point2) align 8 %0, [2 x i64] %1) #0 {
|
||||
%3 = alloca %struct.point2, align 8
|
||||
%4 = bitcast %struct.point2* %3 to [2 x i64]*
|
||||
store [2 x i64] %1, [2 x i64]* %4, align 8
|
||||
%5 = bitcast %struct.point2* %0 to i8*
|
||||
%6 = bitcast %struct.point2* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %5, i8* align 8 %6, i32 16, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo3(%struct.point3* noalias sret(%struct.point3) align 8 %0, [3 x i64] %1) #0 {
|
||||
%3 = alloca %struct.point3, align 8
|
||||
%4 = bitcast %struct.point3* %3 to [3 x i64]*
|
||||
store [3 x i64] %1, [3 x i64]* %4, align 8
|
||||
%5 = bitcast %struct.point3* %0 to i8*
|
||||
%6 = bitcast %struct.point3* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %5, i8* align 8 %6, i32 24, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo4(%struct.point4* noalias sret(%struct.point4) align 8 %0, [4 x i64] %1) #0 {
|
||||
%3 = alloca %struct.point4, align 8
|
||||
%4 = bitcast %struct.point4* %3 to [4 x i64]*
|
||||
store [4 x i64] %1, [4 x i64]* %4, align 8
|
||||
%5 = bitcast %struct.point4* %0 to i8*
|
||||
%6 = bitcast %struct.point4* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %5, i8* align 8 %6, i32 32, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo5(%struct.point5* noalias sret(%struct.point5) align 8 %0, [5 x i64] %1) #0 {
|
||||
%3 = alloca %struct.point5, align 8
|
||||
%4 = bitcast %struct.point5* %3 to [5 x i64]*
|
||||
store [5 x i64] %1, [5 x i64]* %4, align 8
|
||||
%5 = bitcast %struct.point5* %0 to i8*
|
||||
%6 = bitcast %struct.point5* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %5, i8* align 8 %6, i32 40, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo6(%struct.point6* noalias sret(%struct.point6) align 8 %0, [6 x i64] %1) #0 {
|
||||
%3 = alloca %struct.point6, align 8
|
||||
%4 = bitcast %struct.point6* %3 to [6 x i64]*
|
||||
store [6 x i64] %1, [6 x i64]* %4, align 8
|
||||
%5 = bitcast %struct.point6* %0 to i8*
|
||||
%6 = bitcast %struct.point6* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %5, i8* align 8 %6, i32 48, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo7(%struct.point7* noalias sret(%struct.point7) align 8 %0, [7 x i64] %1) #0 {
|
||||
%3 = alloca %struct.point7, align 8
|
||||
%4 = bitcast %struct.point7* %3 to [7 x i64]*
|
||||
store [7 x i64] %1, [7 x i64]* %4, align 8
|
||||
%5 = bitcast %struct.point7* %0 to i8*
|
||||
%6 = bitcast %struct.point7* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %5, i8* align 8 %6, i32 56, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo8(%struct.point8* noalias sret(%struct.point8) align 8 %0, [8 x i64] %1) #0 {
|
||||
%3 = alloca %struct.point8, align 8
|
||||
%4 = bitcast %struct.point8* %3 to [8 x i64]*
|
||||
store [8 x i64] %1, [8 x i64]* %4, align 8
|
||||
%5 = bitcast %struct.point8* %0 to i8*
|
||||
%6 = bitcast %struct.point8* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %5, i8* align 8 %6, i32 64, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo9(%struct.point9* noalias sret(%struct.point9) align 8 %0, %struct.point9* noundef byval(%struct.point9) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point9* %0 to i8*
|
||||
%4 = bitcast %struct.point9* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 72, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo10(%struct.point10* noalias sret(%struct.point10) align 8 %0, %struct.point10* noundef byval(%struct.point10) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point10* %0 to i8*
|
||||
%4 = bitcast %struct.point10* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 80, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo11(%struct.point11* noalias sret(%struct.point11) align 8 %0, %struct.point11* noundef byval(%struct.point11) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point11* %0 to i8*
|
||||
%4 = bitcast %struct.point11* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 88, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo12(%struct.point12* noalias sret(%struct.point12) align 8 %0, %struct.point12* noundef byval(%struct.point12) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point12* %0 to i8*
|
||||
%4 = bitcast %struct.point12* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 96, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo13(%struct.point13* noalias sret(%struct.point13) align 8 %0, %struct.point13* noundef byval(%struct.point13) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point13* %0 to i8*
|
||||
%4 = bitcast %struct.point13* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 104, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo14(%struct.point14* noalias sret(%struct.point14) align 8 %0, %struct.point14* noundef byval(%struct.point14) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point14* %0 to i8*
|
||||
%4 = bitcast %struct.point14* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 112, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo15(%struct.point15* noalias sret(%struct.point15) align 8 %0, %struct.point15* noundef byval(%struct.point15) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point15* %0 to i8*
|
||||
%4 = bitcast %struct.point15* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 120, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo16(%struct.point16* noalias sret(%struct.point16) align 8 %0, %struct.point16* noundef byval(%struct.point16) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point16* %0 to i8*
|
||||
%4 = bitcast %struct.point16* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 128, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo17(%struct.point17* noalias sret(%struct.point17) align 8 %0, %struct.point17* noundef byval(%struct.point17) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point17* %0 to i8*
|
||||
%4 = bitcast %struct.point17* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 136, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo18(%struct.point18* noalias sret(%struct.point18) align 8 %0, %struct.point18* noundef byval(%struct.point18) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point18* %0 to i8*
|
||||
%4 = bitcast %struct.point18* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 144, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo19(%struct.point19* noalias sret(%struct.point19) align 8 %0, %struct.point19* noundef byval(%struct.point19) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point19* %0 to i8*
|
||||
%4 = bitcast %struct.point19* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 152, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo20(%struct.point20* noalias sret(%struct.point20) align 8 %0, %struct.point20* noundef byval(%struct.point20) align 8 %1) #0 {
|
||||
%3 = bitcast %struct.point20* %0 to i8*
|
||||
%4 = bitcast %struct.point20* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %3, i8* align 8 %4, i32 160, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="arm1176jzf-s" "target-features"="+armv6kz,+dsp,+fp64,+strict-align,+vfp2,+vfp2sp,-aes,-d32,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fullfp16,-neon,-sha2,-thumb-mode,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp" }
|
||||
attributes #1 = { argmemonly nofree nounwind willreturn }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!llvm.ident = !{!9}
|
||||
|
||||
!0 = !{i32 1, !"wchar_size", i32 4}
|
||||
!1 = !{i32 1, !"min_enum_size", i32 4}
|
||||
!2 = !{i32 8, !"branch-target-enforcement", i32 0}
|
||||
!3 = !{i32 8, !"sign-return-address", i32 0}
|
||||
!4 = !{i32 8, !"sign-return-address-all", i32 0}
|
||||
!5 = !{i32 8, !"sign-return-address-with-bkey", i32 0}
|
||||
!6 = !{i32 7, !"PIC Level", i32 2}
|
||||
!7 = !{i32 7, !"PIE Level", i32 2}
|
||||
!8 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!9 = !{!"Apple clang version 14.0.3 (clang-1403.0.22.14.1)"}
|
||||
325
internal/cabi/_testdata/arch/armv6/struct_int8.ll
Normal file
325
internal/cabi/_testdata/arch/armv6/struct_int8.ll
Normal file
@@ -0,0 +1,325 @@
|
||||
; ModuleID = '../../wrap/struct_int8.c'
|
||||
source_filename = "../../wrap/struct_int8.c"
|
||||
target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
target triple = "armv6kz-unknown-linux-gnueabihf"
|
||||
|
||||
%struct.point1 = type { i8 }
|
||||
%struct.point2 = type { i8, i8 }
|
||||
%struct.point3 = type { i8, i8, i8 }
|
||||
%struct.point4 = type { i8, i8, i8, i8 }
|
||||
%struct.point5 = type { i8, i8, i8, i8, i8 }
|
||||
%struct.point6 = type { i8, i8, i8, i8, i8, i8 }
|
||||
%struct.point7 = type { i8, i8, i8, i8, i8, i8, i8 }
|
||||
%struct.point8 = type { i8, i8, i8, i8, i8, i8, i8, i8 }
|
||||
%struct.point9 = type { i8, i8, i8, i8, i8, i8, i8, i8, i8 }
|
||||
%struct.point10 = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
|
||||
%struct.point11 = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
|
||||
%struct.point12 = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
|
||||
%struct.point13 = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
|
||||
%struct.point14 = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
|
||||
%struct.point15 = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
|
||||
%struct.point16 = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
|
||||
%struct.point17 = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
|
||||
%struct.point18 = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
|
||||
%struct.point19 = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
|
||||
%struct.point20 = type { i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8, i8 }
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local i8 @demo1([1 x i32] %0) #0 {
|
||||
%2 = alloca %struct.point1, align 1
|
||||
%3 = alloca %struct.point1, align 1
|
||||
%4 = alloca [1 x i32], align 4
|
||||
%5 = getelementptr inbounds %struct.point1, %struct.point1* %3, i32 0, i32 0
|
||||
store [1 x i32] %0, [1 x i32]* %4, align 4
|
||||
%6 = bitcast [1 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %5, i8* align 4 %6, i32 1, i1 false)
|
||||
%7 = bitcast %struct.point1* %2 to i8*
|
||||
%8 = bitcast %struct.point1* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %7, i8* align 1 %8, i32 1, i1 false)
|
||||
%9 = getelementptr inbounds %struct.point1, %struct.point1* %2, i32 0, i32 0
|
||||
%10 = load i8, i8* %9, align 1
|
||||
ret i8 %10
|
||||
}
|
||||
|
||||
; Function Attrs: argmemonly nofree nounwind willreturn
|
||||
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i32, i1 immarg) #1
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local i16 @demo2([1 x i32] %0) #0 {
|
||||
%2 = alloca %struct.point2, align 1
|
||||
%3 = alloca %struct.point2, align 1
|
||||
%4 = alloca [1 x i32], align 4
|
||||
store [1 x i32] %0, [1 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point2* %3 to i8*
|
||||
%6 = bitcast [1 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %5, i8* align 4 %6, i32 2, i1 false)
|
||||
%7 = bitcast %struct.point2* %2 to i8*
|
||||
%8 = bitcast %struct.point2* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %7, i8* align 1 %8, i32 2, i1 false)
|
||||
%9 = bitcast %struct.point2* %2 to i16*
|
||||
%10 = load i16, i16* %9, align 1
|
||||
ret i16 %10
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local i32 @demo3([1 x i32] %0) #0 {
|
||||
%2 = alloca %struct.point3, align 1
|
||||
%3 = alloca %struct.point3, align 1
|
||||
%4 = alloca [1 x i32], align 4
|
||||
%5 = alloca i32, align 4
|
||||
store [1 x i32] %0, [1 x i32]* %4, align 4
|
||||
%6 = bitcast %struct.point3* %3 to i8*
|
||||
%7 = bitcast [1 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %6, i8* align 4 %7, i32 3, i1 false)
|
||||
%8 = bitcast %struct.point3* %2 to i8*
|
||||
%9 = bitcast %struct.point3* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %8, i8* align 1 %9, i32 3, i1 false)
|
||||
%10 = bitcast i32* %5 to i8*
|
||||
%11 = bitcast %struct.point3* %2 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %10, i8* align 1 %11, i32 3, i1 false)
|
||||
%12 = load i32, i32* %5, align 4
|
||||
ret i32 %12
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local i32 @demo4([1 x i32] %0) #0 {
|
||||
%2 = alloca %struct.point4, align 1
|
||||
%3 = alloca %struct.point4, align 1
|
||||
%4 = bitcast %struct.point4* %3 to [1 x i32]*
|
||||
store [1 x i32] %0, [1 x i32]* %4, align 1
|
||||
%5 = bitcast %struct.point4* %2 to i8*
|
||||
%6 = bitcast %struct.point4* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %5, i8* align 1 %6, i32 4, i1 false)
|
||||
%7 = bitcast %struct.point4* %2 to i32*
|
||||
%8 = load i32, i32* %7, align 1
|
||||
ret i32 %8
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo5(%struct.point5* noalias sret(%struct.point5) align 1 %0, [2 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point5, align 1
|
||||
%4 = alloca [2 x i32], align 4
|
||||
store [2 x i32] %1, [2 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point5* %3 to i8*
|
||||
%6 = bitcast [2 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %5, i8* align 4 %6, i32 5, i1 false)
|
||||
%7 = bitcast %struct.point5* %0 to i8*
|
||||
%8 = bitcast %struct.point5* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %7, i8* align 1 %8, i32 5, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo6(%struct.point6* noalias sret(%struct.point6) align 1 %0, [2 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point6, align 1
|
||||
%4 = alloca [2 x i32], align 4
|
||||
store [2 x i32] %1, [2 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point6* %3 to i8*
|
||||
%6 = bitcast [2 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %5, i8* align 4 %6, i32 6, i1 false)
|
||||
%7 = bitcast %struct.point6* %0 to i8*
|
||||
%8 = bitcast %struct.point6* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %7, i8* align 1 %8, i32 6, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo7(%struct.point7* noalias sret(%struct.point7) align 1 %0, [2 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point7, align 1
|
||||
%4 = alloca [2 x i32], align 4
|
||||
store [2 x i32] %1, [2 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point7* %3 to i8*
|
||||
%6 = bitcast [2 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %5, i8* align 4 %6, i32 7, i1 false)
|
||||
%7 = bitcast %struct.point7* %0 to i8*
|
||||
%8 = bitcast %struct.point7* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %7, i8* align 1 %8, i32 7, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo8(%struct.point8* noalias sret(%struct.point8) align 1 %0, [2 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point8, align 1
|
||||
%4 = bitcast %struct.point8* %3 to [2 x i32]*
|
||||
store [2 x i32] %1, [2 x i32]* %4, align 1
|
||||
%5 = bitcast %struct.point8* %0 to i8*
|
||||
%6 = bitcast %struct.point8* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %5, i8* align 1 %6, i32 8, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo9(%struct.point9* noalias sret(%struct.point9) align 1 %0, [3 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point9, align 1
|
||||
%4 = alloca [3 x i32], align 4
|
||||
store [3 x i32] %1, [3 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point9* %3 to i8*
|
||||
%6 = bitcast [3 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %5, i8* align 4 %6, i32 9, i1 false)
|
||||
%7 = bitcast %struct.point9* %0 to i8*
|
||||
%8 = bitcast %struct.point9* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %7, i8* align 1 %8, i32 9, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo10(%struct.point10* noalias sret(%struct.point10) align 1 %0, [3 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point10, align 1
|
||||
%4 = alloca [3 x i32], align 4
|
||||
store [3 x i32] %1, [3 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point10* %3 to i8*
|
||||
%6 = bitcast [3 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %5, i8* align 4 %6, i32 10, i1 false)
|
||||
%7 = bitcast %struct.point10* %0 to i8*
|
||||
%8 = bitcast %struct.point10* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %7, i8* align 1 %8, i32 10, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo11(%struct.point11* noalias sret(%struct.point11) align 1 %0, [3 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point11, align 1
|
||||
%4 = alloca [3 x i32], align 4
|
||||
store [3 x i32] %1, [3 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point11* %3 to i8*
|
||||
%6 = bitcast [3 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %5, i8* align 4 %6, i32 11, i1 false)
|
||||
%7 = bitcast %struct.point11* %0 to i8*
|
||||
%8 = bitcast %struct.point11* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %7, i8* align 1 %8, i32 11, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo12(%struct.point12* noalias sret(%struct.point12) align 1 %0, [3 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point12, align 1
|
||||
%4 = bitcast %struct.point12* %3 to [3 x i32]*
|
||||
store [3 x i32] %1, [3 x i32]* %4, align 1
|
||||
%5 = bitcast %struct.point12* %0 to i8*
|
||||
%6 = bitcast %struct.point12* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %5, i8* align 1 %6, i32 12, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo13(%struct.point13* noalias sret(%struct.point13) align 1 %0, [4 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point13, align 1
|
||||
%4 = alloca [4 x i32], align 4
|
||||
store [4 x i32] %1, [4 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point13* %3 to i8*
|
||||
%6 = bitcast [4 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %5, i8* align 4 %6, i32 13, i1 false)
|
||||
%7 = bitcast %struct.point13* %0 to i8*
|
||||
%8 = bitcast %struct.point13* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %7, i8* align 1 %8, i32 13, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo14(%struct.point14* noalias sret(%struct.point14) align 1 %0, [4 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point14, align 1
|
||||
%4 = alloca [4 x i32], align 4
|
||||
store [4 x i32] %1, [4 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point14* %3 to i8*
|
||||
%6 = bitcast [4 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %5, i8* align 4 %6, i32 14, i1 false)
|
||||
%7 = bitcast %struct.point14* %0 to i8*
|
||||
%8 = bitcast %struct.point14* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %7, i8* align 1 %8, i32 14, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo15(%struct.point15* noalias sret(%struct.point15) align 1 %0, [4 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point15, align 1
|
||||
%4 = alloca [4 x i32], align 4
|
||||
store [4 x i32] %1, [4 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point15* %3 to i8*
|
||||
%6 = bitcast [4 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %5, i8* align 4 %6, i32 15, i1 false)
|
||||
%7 = bitcast %struct.point15* %0 to i8*
|
||||
%8 = bitcast %struct.point15* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %7, i8* align 1 %8, i32 15, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo16(%struct.point16* noalias sret(%struct.point16) align 1 %0, [4 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point16, align 1
|
||||
%4 = bitcast %struct.point16* %3 to [4 x i32]*
|
||||
store [4 x i32] %1, [4 x i32]* %4, align 1
|
||||
%5 = bitcast %struct.point16* %0 to i8*
|
||||
%6 = bitcast %struct.point16* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %5, i8* align 1 %6, i32 16, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo17(%struct.point17* noalias sret(%struct.point17) align 1 %0, [5 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point17, align 1
|
||||
%4 = alloca [5 x i32], align 4
|
||||
store [5 x i32] %1, [5 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point17* %3 to i8*
|
||||
%6 = bitcast [5 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %5, i8* align 4 %6, i32 17, i1 false)
|
||||
%7 = bitcast %struct.point17* %0 to i8*
|
||||
%8 = bitcast %struct.point17* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %7, i8* align 1 %8, i32 17, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo18(%struct.point18* noalias sret(%struct.point18) align 1 %0, [5 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point18, align 1
|
||||
%4 = alloca [5 x i32], align 4
|
||||
store [5 x i32] %1, [5 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point18* %3 to i8*
|
||||
%6 = bitcast [5 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %5, i8* align 4 %6, i32 18, i1 false)
|
||||
%7 = bitcast %struct.point18* %0 to i8*
|
||||
%8 = bitcast %struct.point18* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %7, i8* align 1 %8, i32 18, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo19(%struct.point19* noalias sret(%struct.point19) align 1 %0, [5 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point19, align 1
|
||||
%4 = alloca [5 x i32], align 4
|
||||
store [5 x i32] %1, [5 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point19* %3 to i8*
|
||||
%6 = bitcast [5 x i32]* %4 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %5, i8* align 4 %6, i32 19, i1 false)
|
||||
%7 = bitcast %struct.point19* %0 to i8*
|
||||
%8 = bitcast %struct.point19* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %7, i8* align 1 %8, i32 19, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo20(%struct.point20* noalias sret(%struct.point20) align 1 %0, [5 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point20, align 1
|
||||
%4 = bitcast %struct.point20* %3 to [5 x i32]*
|
||||
store [5 x i32] %1, [5 x i32]* %4, align 1
|
||||
%5 = bitcast %struct.point20* %0 to i8*
|
||||
%6 = bitcast %struct.point20* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 1 %5, i8* align 1 %6, i32 20, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="arm1176jzf-s" "target-features"="+armv6kz,+dsp,+fp64,+strict-align,+vfp2,+vfp2sp,-aes,-d32,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fullfp16,-neon,-sha2,-thumb-mode,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp" }
|
||||
attributes #1 = { argmemonly nofree nounwind willreturn }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!llvm.ident = !{!9}
|
||||
|
||||
!0 = !{i32 1, !"wchar_size", i32 4}
|
||||
!1 = !{i32 1, !"min_enum_size", i32 4}
|
||||
!2 = !{i32 8, !"branch-target-enforcement", i32 0}
|
||||
!3 = !{i32 8, !"sign-return-address", i32 0}
|
||||
!4 = !{i32 8, !"sign-return-address-all", i32 0}
|
||||
!5 = !{i32 8, !"sign-return-address-with-bkey", i32 0}
|
||||
!6 = !{i32 7, !"PIC Level", i32 2}
|
||||
!7 = !{i32 7, !"PIE Level", i32 2}
|
||||
!8 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!9 = !{!"Apple clang version 14.0.3 (clang-1403.0.22.14.1)"}
|
||||
258
internal/cabi/_testdata/arch/armv6/struct_uintptr.ll
Normal file
258
internal/cabi/_testdata/arch/armv6/struct_uintptr.ll
Normal file
@@ -0,0 +1,258 @@
|
||||
; ModuleID = '../../wrap/struct_uintptr.c'
|
||||
source_filename = "../../wrap/struct_uintptr.c"
|
||||
target datalayout = "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64"
|
||||
target triple = "armv6kz-unknown-linux-gnueabihf"
|
||||
|
||||
%struct.point1 = type { i8* }
|
||||
%struct.point2 = type { i8*, i8* }
|
||||
%struct.point3 = type { i8*, i8*, i8* }
|
||||
%struct.point4 = type { i8*, i8*, i8*, i8* }
|
||||
%struct.point5 = type { i8*, i8*, i8*, i8*, i8* }
|
||||
%struct.point6 = type { i8*, i8*, i8*, i8*, i8*, i8* }
|
||||
%struct.point7 = type { i8*, i8*, i8*, i8*, i8*, i8*, i8* }
|
||||
%struct.point8 = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }
|
||||
%struct.point9 = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }
|
||||
%struct.point10 = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }
|
||||
%struct.point11 = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }
|
||||
%struct.point12 = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }
|
||||
%struct.point13 = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }
|
||||
%struct.point14 = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }
|
||||
%struct.point15 = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }
|
||||
%struct.point16 = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }
|
||||
%struct.point17 = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }
|
||||
%struct.point18 = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }
|
||||
%struct.point19 = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }
|
||||
%struct.point20 = type { i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8*, i8* }
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local i32 @demo1([1 x i32] %0) #0 {
|
||||
%2 = alloca %struct.point1, align 4
|
||||
%3 = alloca %struct.point1, align 4
|
||||
%4 = getelementptr inbounds %struct.point1, %struct.point1* %3, i32 0, i32 0
|
||||
%5 = bitcast i8** %4 to [1 x i32]*
|
||||
store [1 x i32] %0, [1 x i32]* %5, align 4
|
||||
%6 = bitcast %struct.point1* %2 to i8*
|
||||
%7 = bitcast %struct.point1* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %6, i8* align 4 %7, i32 4, i1 false)
|
||||
%8 = getelementptr inbounds %struct.point1, %struct.point1* %2, i32 0, i32 0
|
||||
%9 = load i8*, i8** %8, align 4
|
||||
%10 = ptrtoint i8* %9 to i32
|
||||
ret i32 %10
|
||||
}
|
||||
|
||||
; Function Attrs: argmemonly nofree nounwind willreturn
|
||||
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* noalias nocapture writeonly, i8* noalias nocapture readonly, i32, i1 immarg) #1
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo2(%struct.point2* noalias sret(%struct.point2) align 4 %0, [2 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point2, align 4
|
||||
%4 = bitcast %struct.point2* %3 to [2 x i32]*
|
||||
store [2 x i32] %1, [2 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point2* %0 to i8*
|
||||
%6 = bitcast %struct.point2* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 8, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo3(%struct.point3* noalias sret(%struct.point3) align 4 %0, [3 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point3, align 4
|
||||
%4 = bitcast %struct.point3* %3 to [3 x i32]*
|
||||
store [3 x i32] %1, [3 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point3* %0 to i8*
|
||||
%6 = bitcast %struct.point3* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 12, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo4(%struct.point4* noalias sret(%struct.point4) align 4 %0, [4 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point4, align 4
|
||||
%4 = bitcast %struct.point4* %3 to [4 x i32]*
|
||||
store [4 x i32] %1, [4 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point4* %0 to i8*
|
||||
%6 = bitcast %struct.point4* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 16, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo5(%struct.point5* noalias sret(%struct.point5) align 4 %0, [5 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point5, align 4
|
||||
%4 = bitcast %struct.point5* %3 to [5 x i32]*
|
||||
store [5 x i32] %1, [5 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point5* %0 to i8*
|
||||
%6 = bitcast %struct.point5* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 20, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo6(%struct.point6* noalias sret(%struct.point6) align 4 %0, [6 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point6, align 4
|
||||
%4 = bitcast %struct.point6* %3 to [6 x i32]*
|
||||
store [6 x i32] %1, [6 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point6* %0 to i8*
|
||||
%6 = bitcast %struct.point6* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 24, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo7(%struct.point7* noalias sret(%struct.point7) align 4 %0, [7 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point7, align 4
|
||||
%4 = bitcast %struct.point7* %3 to [7 x i32]*
|
||||
store [7 x i32] %1, [7 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point7* %0 to i8*
|
||||
%6 = bitcast %struct.point7* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 28, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo8(%struct.point8* noalias sret(%struct.point8) align 4 %0, [8 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point8, align 4
|
||||
%4 = bitcast %struct.point8* %3 to [8 x i32]*
|
||||
store [8 x i32] %1, [8 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point8* %0 to i8*
|
||||
%6 = bitcast %struct.point8* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 32, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo9(%struct.point9* noalias sret(%struct.point9) align 4 %0, [9 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point9, align 4
|
||||
%4 = bitcast %struct.point9* %3 to [9 x i32]*
|
||||
store [9 x i32] %1, [9 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point9* %0 to i8*
|
||||
%6 = bitcast %struct.point9* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 36, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo10(%struct.point10* noalias sret(%struct.point10) align 4 %0, [10 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point10, align 4
|
||||
%4 = bitcast %struct.point10* %3 to [10 x i32]*
|
||||
store [10 x i32] %1, [10 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point10* %0 to i8*
|
||||
%6 = bitcast %struct.point10* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 40, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo11(%struct.point11* noalias sret(%struct.point11) align 4 %0, [11 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point11, align 4
|
||||
%4 = bitcast %struct.point11* %3 to [11 x i32]*
|
||||
store [11 x i32] %1, [11 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point11* %0 to i8*
|
||||
%6 = bitcast %struct.point11* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 44, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo12(%struct.point12* noalias sret(%struct.point12) align 4 %0, [12 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point12, align 4
|
||||
%4 = bitcast %struct.point12* %3 to [12 x i32]*
|
||||
store [12 x i32] %1, [12 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point12* %0 to i8*
|
||||
%6 = bitcast %struct.point12* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 48, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo13(%struct.point13* noalias sret(%struct.point13) align 4 %0, [13 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point13, align 4
|
||||
%4 = bitcast %struct.point13* %3 to [13 x i32]*
|
||||
store [13 x i32] %1, [13 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point13* %0 to i8*
|
||||
%6 = bitcast %struct.point13* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 52, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo14(%struct.point14* noalias sret(%struct.point14) align 4 %0, [14 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point14, align 4
|
||||
%4 = bitcast %struct.point14* %3 to [14 x i32]*
|
||||
store [14 x i32] %1, [14 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point14* %0 to i8*
|
||||
%6 = bitcast %struct.point14* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 56, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo15(%struct.point15* noalias sret(%struct.point15) align 4 %0, [15 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point15, align 4
|
||||
%4 = bitcast %struct.point15* %3 to [15 x i32]*
|
||||
store [15 x i32] %1, [15 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point15* %0 to i8*
|
||||
%6 = bitcast %struct.point15* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 60, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo16(%struct.point16* noalias sret(%struct.point16) align 4 %0, [16 x i32] %1) #0 {
|
||||
%3 = alloca %struct.point16, align 4
|
||||
%4 = bitcast %struct.point16* %3 to [16 x i32]*
|
||||
store [16 x i32] %1, [16 x i32]* %4, align 4
|
||||
%5 = bitcast %struct.point16* %0 to i8*
|
||||
%6 = bitcast %struct.point16* %3 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %5, i8* align 4 %6, i32 64, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo17(%struct.point17* noalias sret(%struct.point17) align 4 %0, %struct.point17* noundef byval(%struct.point17) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.point17* %0 to i8*
|
||||
%4 = bitcast %struct.point17* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 68, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo18(%struct.point18* noalias sret(%struct.point18) align 4 %0, %struct.point18* noundef byval(%struct.point18) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.point18* %0 to i8*
|
||||
%4 = bitcast %struct.point18* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 72, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo19(%struct.point19* noalias sret(%struct.point19) align 4 %0, %struct.point19* noundef byval(%struct.point19) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.point19* %0 to i8*
|
||||
%4 = bitcast %struct.point19* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 76, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
; Function Attrs: noinline nounwind optnone
|
||||
define dso_local void @demo20(%struct.point20* noalias sret(%struct.point20) align 4 %0, %struct.point20* noundef byval(%struct.point20) align 4 %1) #0 {
|
||||
%3 = bitcast %struct.point20* %0 to i8*
|
||||
%4 = bitcast %struct.point20* %1 to i8*
|
||||
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %3, i8* align 4 %4, i32 80, i1 false)
|
||||
ret void
|
||||
}
|
||||
|
||||
attributes #0 = { noinline nounwind optnone "frame-pointer"="all" "min-legal-vector-width"="0" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "target-cpu"="arm1176jzf-s" "target-features"="+armv6kz,+dsp,+fp64,+strict-align,+vfp2,+vfp2sp,-aes,-d32,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fp16,-fp16fml,-fullfp16,-neon,-sha2,-thumb-mode,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp" }
|
||||
attributes #1 = { argmemonly nofree nounwind willreturn }
|
||||
|
||||
!llvm.module.flags = !{!0, !1, !2, !3, !4, !5, !6, !7, !8}
|
||||
!llvm.ident = !{!9}
|
||||
|
||||
!0 = !{i32 1, !"wchar_size", i32 4}
|
||||
!1 = !{i32 1, !"min_enum_size", i32 4}
|
||||
!2 = !{i32 8, !"branch-target-enforcement", i32 0}
|
||||
!3 = !{i32 8, !"sign-return-address", i32 0}
|
||||
!4 = !{i32 8, !"sign-return-address-all", i32 0}
|
||||
!5 = !{i32 8, !"sign-return-address-with-bkey", i32 0}
|
||||
!6 = !{i32 7, !"PIC Level", i32 2}
|
||||
!7 = !{i32 7, !"PIE Level", i32 2}
|
||||
!8 = !{i32 7, !"frame-pointer", i32 2}
|
||||
!9 = !{!"Apple clang version 14.0.3 (clang-1403.0.22.14.1)"}
|
||||
Reference in New Issue
Block a user