mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-16 07:28:52 +00:00
Add tests
This commit is contained in:
22
examples/ir2/integer_literal.ir
Normal file
22
examples/ir2/integer_literal.ir
Normal file
@@ -0,0 +1,22 @@
|
||||
|
||||
fun i32 @main () {
|
||||
init:
|
||||
bid: b0
|
||||
allocations:
|
||||
%l0:i16:temp
|
||||
%l1:u32:temp2
|
||||
|
||||
block b0:
|
||||
%b0:i0:i16 = typecast 0:i32 to i16
|
||||
%b0:i1:unit = nop
|
||||
%b0:i2:unit = nop
|
||||
%b0:i3:unit = nop
|
||||
%b0:i4:unit = nop
|
||||
%b0:i5:u32 = typecast %b0:i0:i16 to u32
|
||||
%b0:i6:u32 = xor %b0:i5:u32 4294967163:u32
|
||||
%b0:i7:i8 = typecast %b0:i6:u32 to i8
|
||||
%b0:i8:i32 = typecast %b0:i7:i8 to i32
|
||||
%b0:i9:u1 = cmp eq %b0:i8:i32 123:i32
|
||||
%b0:i10:i32 = typecast %b0:i9:u1 to i32
|
||||
ret %b0:i10:i32
|
||||
}
|
||||
Reference in New Issue
Block a user