Optimize recast.

This commit is contained in:
Christoffer Lerno
2025-01-04 21:57:58 +01:00
parent 61badb6af7
commit 6f9b466d7c
3 changed files with 44 additions and 16 deletions

View File

@@ -22,18 +22,15 @@ bitstruct Foo : ushort
%e = alloca i8, align 1
%x = alloca i16, align 2
%literal = alloca i16, align 2
%z = alloca i16, align 2
store i8 0, ptr %e, align 1
%0 = load i8, ptr %e, align 1
%zext = zext i8 %0 to i16
%1 = and i16 %zext, 255
store i16 %1, ptr %literal, align 2
%2 = load i16, ptr %literal, align 2
store i16 %2, ptr %x, align 2
%3 = load i8, ptr %e, align 1
%zext1 = zext i8 %3 to i16
%4 = and i16 %zext1, 255
store i16 %4, ptr %z, align 2
store i16 %1, ptr %x, align 2
%2 = load i8, ptr %e, align 1
%zext1 = zext i8 %2 to i16
%3 = and i16 %zext1, 255
store i16 %3, ptr %z, align 2
ret i64 0
}