// The IR code represents the below function. // The unused local `x` must be optimized away. // // abi Abi { // fn assign_config_call_pass_config(); // } // // configurable { CONFIG: u64 = 1234 } // // impl Abi for Contract { // fn assign_config_call_pass_config() { // let x = CONFIG; // poke(CONFIG); // } // } contract { CONFIG = config u64, abi_decode_in_place_0, 0x00000000000004d2 pub fn abi_decode_in_place_0(ptr: u64, len: u64, target: u64) -> () { entry(ptr: u64, len: u64, target: u64): v0 = const unit () ret () v0 } pub entry fn assign_config_call_pass_config<28892dec>() -> () { local u64 x entry(): v0 = get_config ptr u64, CONFIG v1 = load v0 v2 = get_local ptr u64, x store v1 to v2 v3 = get_config ptr u64, CONFIG v4 = load v3 v5 = call poke_0(v4) v6 = const unit () ret () v6 } fn poke_0(_x: u64) -> () { entry(_x: u64): v0 = const unit () ret () v0 } } // check: pub entry fn assign_config_call_pass_config // nextln: entry(): // nextln: v0 = get_config ptr u64, CONFIG // nextln: v1 = load v0 // nextln: v2 = call poke_0(v1) // not: store // check: ret ()