diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6e274dafd73f1260bbf5b8c5d8b8a0ef886503e8..cd55c36ff1279538dc889bc876784fdf78314982 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2005-10-31 J"orn Rennecke <joern.rennecke@st.com> + + * optabs.c (expand_unop): Take TRULY_NOOP_TRUNCATION into account. + 2005-10-31 Andrew Pinski <pinskia@physics.uc.edu> PR middle-end/23492 diff --git a/gcc/optabs.c b/gcc/optabs.c index c043bb0c32beb72164dbab537ca16fa8719dc96e..d3e1db69eddbbc7a0e06fbdb3a50d4b9c3e14364 100644 --- a/gcc/optabs.c +++ b/gcc/optabs.c @@ -2434,7 +2434,9 @@ expand_unop (enum machine_mode mode, optab unoptab, rtx op0, rtx target, if (temp) { - if (class != MODE_INT) + if (class != MODE_INT + || !TRULY_NOOP_TRUNCATION (GET_MODE_BITSIZE (mode), + GET_MODE_BITSIZE (wider_mode))) { if (target == 0) target = gen_reg_rtx (mode);