On 5/6/25 04:05, Paolo Bonzini wrote:
On 5/5/25 22:27, Richard Henderson wrote:
+ /* Bits that are known 1 and bits that are known 0 must not overlap. */
+ tcg_debug_assert((o_mask & ~z_mask) == 0);
+
+ /* All bits that are not known zero are known one is a constant. */
+ if (z_mask == o_mask) {
+ return tcg_opt_gen_movi(ctx, op, op->args[0], o_mask);
+ }
+ /* All bits known zero is zero. */
if (z_mask == 0) {
return tcg_opt_gen_movi(ctx, op, op->args[0], 0);
}
Just a nit, but this second check is now redundant. z_mask == 0 implies that o_mask == 0
(otherwise o_mask & z_mask is not zero); therefore the "if (z_mask == o_mask)" must have
returned from fold_masks_zos().
Yep, thanks.
r~