test_via_ir_equivalence(): Simplify by merging the asm loops

- And fix indentation
This commit is contained in:
Kamil Śliwak 2023-05-23 15:30:07 +02:00
parent bcdb41f743
commit 8c5304368d

View File

@ -332,14 +332,14 @@ function test_via_ir_equivalence()
sed '/^Optimized IR:$/d' |
split_on_empty_lines_into_numbered_files "$output_file_prefix" ".yul"
for yul_file in $(find . -name "${output_file_prefix}*.yul" | sort -V); do
msg_on_error --no-stderr "$SOLC" --strict-assembly --asm "${optimizer_flags[@]}" "$yul_file" |
sed '/^Text representation:$/d' > "${yul_file/.yul/.asm}"
done
local asm_output_two_stage asm_output_via_ir
for asm_file in $(find . -name "${output_file_prefix}*.asm" | sort -V); do
asm_output_two_stage+=$(sed '/^=======/d')
for yul_file in $(find . -name "${output_file_prefix}*.yul" | sort -V); do
asm_output_two_stage+=$(
msg_on_error --no-stderr "$SOLC" --strict-assembly --asm "${optimizer_flags[@]}" "$yul_file" |
sed '/^Text representation:$/d' |
sed '/^=======/d'
)
done
asm_output_via_ir=$(