https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61298
baoshan <pangbw at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pangbw at gmail dot com
--- Comment #2 from baoshan <pangbw at gmail dot com> ---
It shows the problem in unsigned_reg_p():rtlanal.c:
bool
unsigned_reg_p (rtx op)
{
if (REG_P (op)
&& REG_EXPR (op)
&& TYPE_UNSIGNED (TREE_TYPE (REG_EXPR (op))))
return true;
if (GET_CODE (op) == SUBREG
&& SUBREG_PROMOTED_UNSIGNED_P (op))
return true;
return false;
}
Without -m64, the first clause would return with true.
With option -m64, the 'op' comes with this formal:
(subreg:SI (reg/v:DI 126 [ c1+-7 ]) 4)
The two clauses here both return with false.
Is it legal to think the whole SUBREG expression is unsigned if the inner
EXPRESSION is unsigned? Or can I fix it with this clause?
if (GET_CODE (op) == SUBREG) return unsigned_reg_p(XEXP(op,0));