Skip to contentSkip to conversation

tcg/optimize: Save o_mask in fold_masks_zosa_int

PATCH In review Richard Henderson 3 participants 3 messages Jan 6 – Jan 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tcg/optimize: Save o_mask in fold_masks_zosa_int

When adding o_mask to this function, we used it in a couple of places but failed to save it for future use. Also, update a related comment.

Fixes 9e397cc0df9 ("tcg/optimize: Introduce fold_masks_zosa")
---
 tcg/optimize.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tcg/optimize.c +2 -1
index c546e8910b..23278799af 100644
@@ -1088,8 +1088,9 @@ static bool fold_masks_zosa_int(OptContext *ctx, TCGOp *op,
 
     ti = ts_info(ts);
     ti->z_mask = z_mask;
+    ti->o_mask = o_mask;
 
-    /* Canonicalize s_mask and incorporate data from z_mask. */
+    /* Canonicalize s_mask and incorporate data from [zo]_mask. */
     rep = clz64(~s_mask);
     rep = MAX(rep, clz64(z_mask));
     rep = MAX(rep, clz64(~o_mask));
Signature · 1 line
2.43.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines · Richard Henderson

When adding o_mask to this function, we used it in a couple of places but failed to save it for future use. Also, update a related comment.

Fixes 9e397cc0df9 ("tcg/optimize: Introduce fold_masks_zosa")
---
  tcg/optimize.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
tcg/optimize.c +0 -0
index c546e8910b..23278799af 100644

tcg/optimize.c static bool fold_masks_zosa_int(OptContext *ctx, TCGOp *op, · line 1096

Quoted 10 lines
tcg/optimize.c +2 -1
@@ -1088,8 +1088,9 @@ static bool fold_masks_zosa_int(OptContext *ctx, TCGOp *op,
 
      ti = ts_info(ts);
      ti->z_mask = z_mask;
+    ti->o_mask = o_mask;
 
-    /* Canonicalize s_mask and incorporate data from z_mask. */
+    /* Canonicalize s_mask and incorporate data from [zo]_mask. */
      rep = clz64(~s_mask);
      rep = MAX(rep, clz64(z_mask));
      rep = MAX(rep, clz64(~o_mask));
Reviewed-by on v1 1/1
#2 lore raw
In reply to Richard Henderson
Quoted 6 lines · Richard Henderson

When adding o_mask to this function, we used it in a couple of places but failed to save it for future use. Also, update a related comment.

Fixes 9e397cc0df9 ("tcg/optimize: Introduce fold_masks_zosa")

I think this is:

Fixes 56f15f67ea1 ("tcg/optimize: Add one's mask to TempOptInfo")
Quoted 11 lines
---
  tcg/optimize.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
tcg/optimize.c +0 -0
index c546e8910b..23278799af 100644

tcg/optimize.c static bool fold_masks_zosa_int(OptContext *ctx, TCGOp *op, · line 1091

Quoted 4 lines
tcg/optimize.c +1 -0
@@ -1088,8 +1088,9 @@ static bool fold_masks_zosa_int(OptContext *ctx, TCGOp *op,
 
      ti = ts_info(ts);
      ti->z_mask = z_mask;
+    ti->o_mask = o_mask;