mirror of
https://github.com/kmc7468/cs420.git
synced 2025-12-16 07:28:52 +00:00
Update tests
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
|
||||
fun *i32 @foo (*i32) {
|
||||
fun i32* @foo (i32*) {
|
||||
init:
|
||||
bid: b0
|
||||
allocations:
|
||||
|
||||
|
||||
block b0:
|
||||
ret %b0:p0:*i32
|
||||
ret %b0:p0:i32*
|
||||
}
|
||||
|
||||
fun i32 @main () {
|
||||
@@ -24,21 +24,21 @@ block b2:
|
||||
br %b2:i0:u1, b3(), b5()
|
||||
|
||||
block b3:
|
||||
%b3:i0:*i32 = getelementptr %l0:*[10 x i32] offset 0:i32
|
||||
%b3:i1:*i32 = call @foo:*[ret:*i32 params:(*i32)](%b3:i0:*i32)
|
||||
%b3:i0:i32* = getelementptr %l0:[10 x i32]* offset 0:i32
|
||||
%b3:i1:i32* = call @foo:[ret:i32* params:(i32*)]*(%b3:i0:i32*)
|
||||
%b3:i2:i64 = typecast %b2:p0:i32 to i64
|
||||
%b3:i3:i64 = mul %b3:i2:i64 4:i64
|
||||
%b3:i4:*i32 = getelementptr %b3:i1:*i32 offset %b3:i3:i64
|
||||
%b3:i5:unit = store %b2:p0:i32 %b3:i4:*i32
|
||||
%b3:i4:i32* = getelementptr %b3:i1:i32* offset %b3:i3:i64
|
||||
%b3:i5:unit = store %b2:p0:i32 %b3:i4:i32*
|
||||
%b3:i6:i32 = add %b2:p0:i32 1:i32
|
||||
j b2(%b3:i6:i32)
|
||||
|
||||
block b5:
|
||||
%b5:i0:*i32 = getelementptr %l0:*[10 x i32] offset 0:i32
|
||||
%b5:i0:i32* = getelementptr %l0:[10 x i32]* offset 0:i32
|
||||
%b5:i1:i64 = typecast 5:i32 to i64
|
||||
%b5:i2:i64 = mul %b5:i1:i64 4:i64
|
||||
%b5:i3:*i32 = getelementptr %b5:i0:*i32 offset %b5:i2:i64
|
||||
%b5:i4:i32 = load %b5:i3:*i32
|
||||
%b5:i3:i32* = getelementptr %b5:i0:i32* offset %b5:i2:i64
|
||||
%b5:i4:i32 = load %b5:i3:i32*
|
||||
%b5:i5:u1 = cmp eq %b5:i4:i32 5:i32
|
||||
%b5:i6:i32 = typecast %b5:i5:u1 to i32
|
||||
ret %b5:i6:i32
|
||||
|
||||
Reference in New Issue
Block a user