test/804: u16 row exercises the MOVW copy-tail arm (#35 review)
esz 1/4/8/24/56 left the esz=2 MOVW tail the only emitted-but- unexercised copy arm in both stages' delete lowering. 41 -> 44 fixtures.
This commit is contained in:
@@ -27,6 +27,8 @@
|
||||
* i64_last | [7,11,13], delete(xs[2]) (no copy, | 38
|
||||
* | loop body never runs) |
|
||||
* i32_narrow | []i32 esz=4 — the MOVL copy tail | 229
|
||||
* u16_narrow | []u16 esz=2 — the MOVW copy tail (the | 26
|
||||
* | last otherwise-unexercised tail arm) |
|
||||
* u8_narrow | []u8 esz=1 — the MOVB copy tail | 28
|
||||
* cap_unchanged | manual {ptr,len=3,cap=8} header over a | 91
|
||||
* | stack backing; delete middle; cap must |
|
||||
@@ -137,6 +139,18 @@ static const struct row rows[] = {
|
||||
"};\n",
|
||||
229, NULL },
|
||||
|
||||
{ "u16_narrow",
|
||||
"package main;\n"
|
||||
"export fn main() i32 = {\n"
|
||||
"\tlet xs: []u16 = [];\n"
|
||||
"\tappend(xs, 4u16);\n"
|
||||
"\tappend(xs, 9u16);\n"
|
||||
"\tappend(xs, 2u16);\n"
|
||||
"\tdelete(xs[1]);\n"
|
||||
"\treturn (xs[0] + xs[1]): i32 + len(xs)*10;\n"
|
||||
"};\n",
|
||||
26, NULL },
|
||||
|
||||
{ "u8_narrow",
|
||||
"package main;\n"
|
||||
"export fn main() i32 = {\n"
|
||||
|
||||
Reference in New Issue
Block a user