Optimize sret / byval. Fixes to types and failables.

This commit is contained in:
Christoffer Lerno
2022-10-15 02:36:07 +02:00
committed by Christoffer Lerno
parent dfe3128b16
commit 160659c4e3
44 changed files with 520 additions and 618 deletions

View File

@@ -24,9 +24,7 @@ fn void test(Bar b)
define void @foo_test(ptr byval(%Bar) align 8 %0) #0 {
entry:
%b = alloca %Bar, align 4
call void @llvm.memcpy.p0.p0.i32(ptr align 4 %b, ptr align 8 %0, i32 8, i1 false)
%1 = getelementptr inbounds %Bar, ptr %b, i32 0, i32 2
%1 = getelementptr inbounds %Bar, ptr %0, i32 0, i32 2
%2 = getelementptr inbounds [0 x i32], ptr %1, i64 0, i64 1
ret void
}