mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Deprecated '&' macro arguments.
This commit is contained in:
@@ -9,12 +9,16 @@ fn void main()
|
||||
{
|
||||
Foo* foo;
|
||||
float[<4>] a @align(1) @noinit;
|
||||
float[<4>] b @align(1) @noinit;
|
||||
|
||||
a = *(float[<4>]*)&foo.a;
|
||||
*(float[<4>]*)&foo.a = a;
|
||||
|
||||
a = $$unaligned_load((float[<4>]*)&foo.a, 1);
|
||||
$$unaligned_store((float[<4>]*)&foo.a, a, 1);
|
||||
|
||||
b = @unaligned_load(*(float[<4>]*)&foo.a, 1);
|
||||
@unaligned_store(*(float[<4>]*)&foo.a, b, 1);
|
||||
}
|
||||
|
||||
/* #expect: test.ll
|
||||
@@ -23,6 +27,8 @@ define void @test.main() #0 {
|
||||
entry:
|
||||
%foo = alloca ptr, align 8
|
||||
%a = alloca <4 x float>, align 1
|
||||
%b = alloca <4 x float>, align 1
|
||||
%value = alloca <4 x float>, align 16
|
||||
store ptr null, ptr %foo, align 8
|
||||
%0 = load ptr, ptr %foo, align 8
|
||||
%1 = load <4 x float>, ptr %0, align 16
|
||||
@@ -36,5 +42,13 @@ entry:
|
||||
%6 = load ptr, ptr %foo, align 8
|
||||
%7 = load <4 x float>, ptr %a, align 1
|
||||
store <4 x float> %7, ptr %6, align 1
|
||||
%8 = load ptr, ptr %foo, align 8
|
||||
%9 = load <4 x float>, ptr %8, align 1
|
||||
store <4 x float> %9, ptr %b, align 1
|
||||
%10 = load <4 x float>, ptr %b, align 1
|
||||
store <4 x float> %10, ptr %value, align 16
|
||||
%11 = load ptr, ptr %foo, align 8
|
||||
%12 = load <4 x float>, ptr %value, align 16
|
||||
store <4 x float> %12, ptr %11, align 1
|
||||
ret void
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user