tcg/optimize: Add type to OptContext
authorRichard Henderson <richard.henderson@linaro.org>
Wed, 25 Aug 2021 15:00:20 +0000 (08:00 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Thu, 28 Oct 2021 00:11:22 +0000 (17:11 -0700)
commit67f84c962166093f26a1f2c66034a44cf294e809
tree8a8889a3623728a7d689612f107d75dedc0a6571
parente8679955ec0791122a6c22d48ae760a215204f6a
tcg/optimize: Add type to OptContext

Compute the type of the operation early.

There are at least 4 places that used a def->flags ladder
to determine the type of the operation being optimized.

There were two places that assumed !TCG_OPF_64BIT means
TCG_TYPE_I32, and so could potentially compute incorrect
results for vector operations.

Reviewed-by: Luis Pires <luis.pires@eldorado.org.br>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
tcg/optimize.c