// The IR code represents the below function. // The unused local `x` must be optimized away. // // fn main() { // let x = "str"; // } script { entry fn main() -> () { local { u64, u64 } __anon_0 local slice __anon_1 local slice x entry(): v0 = const string<3> "str" v1 = ptr_to_int v0 to u64 v2 = get_local ptr { u64, u64 }, __anon_0 v3 = const u64 0 v4 = get_elem_ptr v2, ptr u64, v3 store v1 to v4 v5 = const u64 1 v6 = get_elem_ptr v2, ptr u64, v5 v7 = const u64 3 store v7 to v6 v8 = get_local ptr slice, __anon_1 mem_copy_bytes v8, v2, 16 v9 = load v8 v10 = get_local ptr slice, x store v9 to v10 v11 = const unit () ret () v11 } } // check: entry fn main() -> () { // nextln: entry(): // nextln: v0 = const unit () // nextln: ret () v0 // nextln: }