Skip to content

Commit

Permalink
test: update expected IR for dlmalloc test
Browse files Browse the repository at this point in the history
  • Loading branch information
greenhat committed Oct 17, 2023
1 parent b0eda15 commit e0869a2
Showing 1 changed file with 45 additions and 44 deletions.
89 changes: 45 additions & 44 deletions frontend-wasm/tests/expected/dlmalloc.mir
Original file line number Diff line number Diff line change
Expand Up @@ -4639,8 +4639,8 @@ block13:
v33 = const.i32 0 : i32
v34 = cast v33 : u32
v35 = add v34, 1048576 : u32
v36 = inttoptr v35 : *mut i8
v37 = load v36 : i8
v36 = inttoptr v35 : *mut u8
v37 = load v36 : u8
v38 = zext v37 : i32
br block8

Expand All @@ -4651,8 +4651,8 @@ block15:
v45 = const.i32 0 : i32
v46 = cast v45 : u32
v47 = add v46, 1048576 : u32
v48 = inttoptr v47 : *mut i8
v49 = load v48 : i8
v48 = inttoptr v47 : *mut u8
v49 = load v48 : u8
v50 = zext v49 : i32
br block8

Expand Down Expand Up @@ -5017,8 +5017,8 @@ pub fn _ZN8dlmalloc8dlmalloc5Chunk6cinuse17h58499de57c2d37e2E(i32) -> i32 {
block0(v0: i32):
v2 = cast v0 : u32
v3 = add v2, 4 : u32
v4 = inttoptr v3 : *mut i8
v5 = load v4 : i8
v4 = inttoptr v3 : *mut u8
v5 = load v4 : u8
v6 = zext v5 : i32
v7 = const.i32 2 : i32
v8 = band v6, v7 : i32
Expand Down Expand Up @@ -5086,8 +5086,8 @@ pub fn _ZN8dlmalloc8dlmalloc5Chunk7mmapped17h1a9959fbf47496c3E(i32) -> i32 {
block0(v0: i32):
v2 = cast v0 : u32
v3 = add v2, 4 : u32
v4 = inttoptr v3 : *mut i8
v5 = load v4 : i8
v4 = inttoptr v3 : *mut u8
v5 = load v4 : u8
v6 = zext v5 : i32
v7 = const.i32 3 : i32
v8 = band v6, v7 : i32
Expand Down Expand Up @@ -5428,34 +5428,35 @@ block0(v0: i32, v1: i32, v2: i32):
v6 = cast v4 : u32
v7 = shr v5, v6 : u32
v8 = cast v7 : i32
v9 = memory.grow v8 : i32
v10 = const.i32 0 : i32
v11 = cast v0 : u32
v12 = add v11, 8 : u32
v13 = inttoptr v12 : *mut i32
store v13, v10
v14 = const.i32 0 : i32
v15 = const.i32 -65536 : i32
v16 = band v2, v15 : i32
v17 = const.i32 -1 : i32
v18 = eq v9, v17 : i1
v19 = cast v18 : i32
v20 = const.i32 0 : i32
v21 = neq v19, v20 : i1
v22 = select v21, v14, v16 : i32
v23 = cast v0 : u32
v24 = add v23, 4 : u32
v25 = inttoptr v24 : *mut i32
store v25, v22
v26 = const.i32 0 : i32
v27 = const.i32 16 : i32
v28 = shl v9, v27 : i32
v29 = const.i32 0 : i32
v30 = neq v19, v29 : i1
v31 = select v30, v26, v28 : i32
v32 = cast v0 : u32
v33 = inttoptr v32 : *mut i32
store v33, v31
v9 = cast v8 : u32
v10 = memory.grow v9 : i32
v11 = const.i32 0 : i32
v12 = cast v0 : u32
v13 = add v12, 8 : u32
v14 = inttoptr v13 : *mut i32
store v14, v11
v15 = const.i32 0 : i32
v16 = const.i32 -65536 : i32
v17 = band v2, v16 : i32
v18 = const.i32 -1 : i32
v19 = eq v10, v18 : i1
v20 = cast v19 : i32
v21 = const.i32 0 : i32
v22 = neq v20, v21 : i1
v23 = select v22, v15, v17 : i32
v24 = cast v0 : u32
v25 = add v24, 4 : u32
v26 = inttoptr v25 : *mut i32
store v26, v23
v27 = const.i32 0 : i32
v28 = const.i32 16 : i32
v29 = shl v10, v28 : i32
v30 = const.i32 0 : i32
v31 = neq v20, v30 : i1
v32 = select v31, v27, v29 : i32
v33 = cast v0 : u32
v34 = inttoptr v33 : *mut i32
store v34, v32
br block1

block1:
Expand Down Expand Up @@ -5583,12 +5584,12 @@ block6:

block7(v22: i32, v23: i32):
v24 = cast v23 : u32
v25 = inttoptr v24 : *mut i8
v26 = load v25 : i8
v25 = inttoptr v24 : *mut u8
v26 = load v25 : u8
v27 = zext v26 : i32
v28 = trunc v27 : i8
v28 = trunc v27 : u8
v29 = cast v22 : u32
v30 = inttoptr v29 : *mut i8
v30 = inttoptr v29 : *mut u8
store v30, v28
v31 = const.i32 1 : i32
v32 = add v23, v31 : i32
Expand Down Expand Up @@ -5715,12 +5716,12 @@ block22:

block23(v152: i32, v153: i32):
v154 = cast v153 : u32
v155 = inttoptr v154 : *mut i8
v156 = load v155 : i8
v155 = inttoptr v154 : *mut u8
v156 = load v155 : u8
v157 = zext v156 : i32
v158 = trunc v157 : i8
v158 = trunc v157 : u8
v159 = cast v152 : u32
v160 = inttoptr v159 : *mut i8
v160 = inttoptr v159 : *mut u8
store v160, v158
v161 = const.i32 1 : i32
v162 = add v153, v161 : i32
Expand Down

0 comments on commit e0869a2

Please sign in to comment.