tcg/optimize: only read val after const check
authorAlex Bennée <alex.bennee@linaro.org>
Wed, 9 Feb 2022 11:21:42 +0000 (11:21 +0000)
committerRichard Henderson <richard.henderson@linaro.org>
Fri, 4 Mar 2022 18:50:41 +0000 (08:50 -1000)
commit9becc36f0285da206150bc4f0c774f3298aaa439
tree0ca2bc8990c6fc0d712c2bbfc1cfeee5589feea4
parent3d1fbc59665ff8a5d74b0fd30583044fe99e1117
tcg/optimize: only read val after const check

valgrind pointed out that arg_info()->val can be undefined which will
be the case if the arguments are not constant. The ordering of the
checks will have ensured we never relied on an undefined value but for
the sake of completeness re-order the code to be clear.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220209112142.3367525-1-alex.bennee@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
tcg/optimize.c