From fd1be4b5777c0eb96d925cba6e8765a6277f3de3 Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Fri, 20 Sep 2024 19:19:06 +0100 Subject: [PATCH] Vector: Remove some unused result variables There are some vector instructions that use `init_masked_result_cmp` but do not use the returned result variable, so just discard it rather than create a new variable. --- model/riscv_insts_vext_mask.sail | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/model/riscv_insts_vext_mask.sail b/model/riscv_insts_vext_mask.sail index 432ac81bc..4bc6f3122 100755 --- a/model/riscv_insts_vext_mask.sail +++ b/model/riscv_insts_vext_mask.sail @@ -98,8 +98,7 @@ function clause execute(VCPOP_M(vm, vs2, rd)) = { let vm_val : vector('n, dec, bool) = read_vmask(num_elem, vm, 0b00000); let vs2_val : vector('n, dec, bool) = read_vmask(num_elem, 0b0, vs2); - let (initial_result, mask) = init_masked_result_cmp(num_elem, SEW, 0, vs2_val, vm_val); - var result = initial_result; + let (_, mask) = init_masked_result_cmp(num_elem, SEW, 0, vs2_val, vm_val); var count : nat = 0; foreach (i from 0 to (num_elem - 1)) { @@ -133,8 +132,7 @@ function clause execute(VFIRST_M(vm, vs2, rd)) = { let vm_val : vector('n, dec, bool) = read_vmask(num_elem, vm, 0b00000); let vs2_val : vector('n, dec, bool) = read_vmask(num_elem, 0b0, vs2); - let (initial_result, mask) = init_masked_result_cmp(num_elem, SEW, 0, vs2_val, vm_val); - var result = initial_result; + let (_, mask) = init_masked_result_cmp(num_elem, SEW, 0, vs2_val, vm_val); var index : int = -1; foreach (i from 0 to (num_elem - 1)) {