mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
0.5.3: Single-module not respected. Fix issue with compiler defined types. Fix optimization levels for projects. Use GEP i8 on offsets. Optimize foreach on len 1 arrays. Move panic blocks last. Fix generic module wildcard imports. Deprecate init_temp / init_new. Fix issue with macro vaarg and untyped lists. Fix extern const globals.
This commit is contained in:
committed by
Christoffer Lerno
parent
e91f6e268e
commit
deb4cc7c4b
@@ -14,16 +14,17 @@ fn void test(int z)
|
||||
@foo.FOO = local_unnamed_addr constant { [50 x i8], i8, [49 x i8] } { [50 x i8] zeroinitializer, i8 1, [49 x i8] zeroinitializer }, align 16
|
||||
@foo.BAR = local_unnamed_addr constant <4 x i32> <i32 1, i32 2, i32 3, i32 4>, align 16
|
||||
|
||||
; Function Attrs:
|
||||
define void @foo.test(i32 %0) #0 {
|
||||
entry:
|
||||
%s = alloca i8, align 1
|
||||
%zd = alloca i32, align 4
|
||||
%sext = sext i32 %0 to i64
|
||||
%1 = getelementptr inbounds [100 x i8], ptr @foo.FOO, i64 0, i64 %sext
|
||||
%2 = load i8, ptr %1, align 1
|
||||
store i8 %2, ptr %s, align 1
|
||||
%ptradd = getelementptr inbounds i8, ptr @foo.FOO, i64 %sext
|
||||
%1 = load i8, ptr %ptradd, align 1
|
||||
store i8 %1, ptr %s, align 1
|
||||
%sext1 = sext i32 %0 to i64
|
||||
%3 = extractelement <4 x i32> <i32 1, i32 2, i32 3, i32 4>, i64 %sext1
|
||||
store i32 %3, ptr %zd, align 4
|
||||
%2 = extractelement <4 x i32> <i32 1, i32 2, i32 3, i32 4>, i64 %sext1
|
||||
store i32 %2, ptr %zd, align 4
|
||||
ret void
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user