https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102031
Roger Sayle <roger at nextmovesoftware dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |roger at
nextmovesoftware dot com
Last reconfirmed| |2021-08-24
Ever confirmed|0 |1
CC| |roger at nextmovesoftware dot
com
Status|UNCONFIRMED |ASSIGNED
--- Comment #1 from Roger Sayle <roger at nextmovesoftware dot com> ---
It's just not my week... A pair of silly typos. Here's the fix I'm testing:
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index 8eea9fb..c81e27e 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -841,7 +841,7 @@ simplify_context::simplify_truncation (machine_mode mode,
rt
x op,
{
unsigned int int_op_prec = GET_MODE_PRECISION (int_op_mode);
unsigned int subreg_prec = GET_MODE_PRECISION (subreg_mode);
- if (int_op_prec > subreg_mode)
+ if (int_op_prec > subreg_prec)
{
if (int_mode == subreg_mode)
return SUBREG_REG (op);
@@ -851,7 +851,7 @@ simplify_context::simplify_truncation (machine_mode mode,
rt
x op,
}
/* Simplification of (truncate:A (subreg:B X:C 0)) where
A is narrower than B and B is narrower than C. */
- else if (int_op_prec < subreg_mode
+ else if (int_op_prec < subreg_prec
&& GET_MODE_PRECISION (int_mode) < int_op_prec)
return simplify_gen_unary (TRUNCATE, int_mode,
SUBREG_REG (op), subreg_mode);