Updated mangling and bump to 0.2.18

This commit is contained in:
Christoffer Lerno
2022-07-19 21:44:02 +02:00
committed by Christoffer Lerno
parent 4afec24434
commit d3a053e049
393 changed files with 2811 additions and 2768 deletions

View File

@@ -20,7 +20,7 @@ fn void main()
/* #expect: foo.ll
define void @foo.main() #0 {
define void @foo_main() #0 {
entry:
%x = alloca [3 x i32], align 4
%y = alloca [3 x i32]*, align 8

View File

@@ -10,7 +10,7 @@ private void*[3] data = { &foo, &bar, &xx };
/* #expect: const_pointer.ll
@const_pointer.foo = protected global double 1.700000e+01, align 8
@const_pointer.bar = protected global double 1.200000e+01, align 8
@const_pointer.xx = protected global float 1.200000e+01, align 4
@const_pointer.data = protected unnamed_addr global [3 x i8*] [i8* bitcast (double* @const_pointer.foo to i8*), i8* bitcast (double* @const_pointer.bar to i8*), i8* bitcast (float* @const_pointer.xx to i8*)], align 16
@const_pointer_foo = protected global double 1.700000e+01, align 8
@const_pointer_bar = protected global double 1.200000e+01, align 8
@const_pointer_xx = protected global float 1.200000e+01, align 4
@const_pointer_data = protected unnamed_addr global [3 x i8*] [i8* bitcast (double* @const_pointer_foo to i8*), i8* bitcast (double* @const_pointer_bar to i8*), i8* bitcast (float* @const_pointer_xx to i8*)], align 16

View File

@@ -24,7 +24,7 @@ fn void test3(long* x)
// #expect: pointer_index.ll
define void @pointer_index.test1(i32* %0) #0 {
define void @pointer_index_test1(i32* %0) #0 {
entry:
%a = alloca i32, align 4
%b = alloca i32, align 4
@@ -45,7 +45,7 @@ entry:
}
; Function Attrs: nounwind
define void @pointer_index.test2(i8* %0) #0 {
define void @pointer_index_test2(i8* %0) #0 {
entry:
%a = alloca i8, align 1
%b = alloca i8, align 1
@@ -61,7 +61,7 @@ entry:
ret void
}
define void @pointer_index.test3(i64* %0) #0 {
define void @pointer_index_test3(i64* %0) #0 {
entry:
%a = alloca i64, align 8
%b = alloca i64, align 8

View File

@@ -29,9 +29,9 @@ fn void main()
%variant = type { i8*, i64 }
%"int[]" = type { i32*, i64 }
@.typeid.int = linkonce constant { i8, i16 } { i8 2, i16 32 }, align 2
@"ct$int" = linkonce constant %.introspect { i8 2, i64 4, i64 0, i64 0, [0 x i64] zeroinitializer }, align 8
define void @foo.test1(i64 %0, i8* %1) #0 {
define void @foo_test1(i64 %0, i8* %1) #0 {
entry:
%z = alloca %variant, align 8
%w = alloca i32*, align 8
@@ -50,7 +50,8 @@ entry:
ret void
}
define void @foo.test2(i8* %0, i64 %1) #0 {
; Function Attrs: nounwind
define void @foo_test2(i8* %0, i64 %1) #0 {
entry:
%z = alloca %"int[]", align 8
%w = alloca i32*, align 8
@@ -68,7 +69,8 @@ entry:
ret void
}
define void @foo.main() #0 {
; Function Attrs: nounwind
define void @foo_main() #0 {
entry:
%x = alloca i32, align 4
%y = alloca i32, align 4
@@ -81,14 +83,14 @@ entry:
call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %0, i8* align 4 bitcast ([2 x i32]* @.__const to i8*), i32 8, i1 false)
%1 = bitcast i32* %x to i8*
%2 = insertvalue %variant undef, i8* %1, 0
%3 = insertvalue %variant %2, i64 ptrtoint ({ i8, i16 }* @.typeid.int to i64), 1
%3 = insertvalue %variant %2, i64 ptrtoint (%.introspect* @"ct$int" to i64), 1
store %variant %3, %variant* %taddr, align 8
%4 = bitcast %variant* %taddr to { i64, i8* }*
%5 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %4, i32 0, i32 0
%lo = load i64, i64* %5, align 8
%6 = getelementptr inbounds { i64, i8* }, { i64, i8* }* %4, i32 0, i32 1
%hi = load i8*, i8** %6, align 8
call void @foo.test1(i64 %lo, i8* %hi)
call void @foo_test1(i64 %lo, i8* %hi)
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %w, i64 0, i64 0
%8 = insertvalue %"int[]" undef, i32* %7, 0
%9 = insertvalue %"int[]" %8, i64 2, 1
@@ -98,6 +100,6 @@ entry:
%lo2 = load i8*, i8** %11, align 8
%12 = getelementptr inbounds { i8*, i64 }, { i8*, i64 }* %10, i32 0, i32 1
%hi3 = load i64, i64* %12, align 8
call void @foo.test2(i8* %lo2, i64 %hi3)
call void @foo_test2(i8* %lo2, i64 %hi3)
ret void
}