Re: [PATCH v3 33/48] tcg/optimize: Add type to OptContext

2021-10-23 Thread Richard Henderson
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_

RE: [PATCH v3 33/48] tcg/optimize: Add type to OptContext

2021-10-22 Thread Luis Fernando Fujita Pires
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) { > +

[PATCH v3 33/48] tcg/optimize: Add type to OptContext

2021-10-21 Thread Richard Henderson
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