On 10/22/21 3:11 PM, Luis Fernando Fujita Pires wrote:
From: Richard Henderson
@@ -1392,18 +1408,18 @@ void tcg_optimize(TCGContext *s)
/* Proceed with possible constant folding. */
break;
}
-if (opc == INDEX_op_sub_
From: Richard Henderson
> @@ -1392,18 +1408,18 @@ void tcg_optimize(TCGContext *s)
> /* Proceed with possible constant folding. */
> break;
> }
> -if (opc == INDEX_op_sub_i32) {
> +switch (ctx.type) {
> +
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