[gcc r17-3558] forwprop: Update comment about the shift
Andrea Pinski via Gcc-cvs <[email protected]>
| Newsgroups | gmane.comp.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
https://gcc.gnu.org/g:e191d71a0627e0ba87c4b002a5fb826f181602ef commit r17-3558-ge191d71a0627e0ba87c4b002a5fb826f181602ef Author: Andrea Pinski <[email protected]> Date: Sat Aug 22 18:58:11 2026 -0700 forwprop: Update comment about the shift This updates about the comment on why tree_to_uhwi is safe. To say it is always less than TYPE_PRECISION. Pushed as obvious. gcc/ChangeLog: * tree-ssa-forwprop.cc (long_mul_set_summand): Update comment on the shift. Signed-off-by: Andrea Pinski <[email protected]> Diff: --- gcc/tree-ssa-forwprop.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gcc/tree-ssa-forwprop.cc b/gcc/tree-ssa-forwprop.cc index 3433e3d02b9e..c31dd1c94ec0 100644 --- a/gcc/tree-ssa-forwprop.cc +++ b/gcc/tree-ssa-forwprop.cc @@ -3891,8 +3891,7 @@ long_mul_set_summand (long_mul_summand *info, long_mul_kind kind, info->hilo[i] = res_ops[n_ops + i]; if (shift_idx >= 0) /* The carry atoms (mul_carry_cross_sum, mul_carry_low_sum) capture the - shift as an INTEGER_CST already checked with tree_fits_uhwi_p, so this - cannot overflow. */ + shift since it is always less than TYPE_PRECISION, using tree_to_uhwi is safe. */ info->shift = tree_to_uhwi (res_ops[shift_idx]); }