From: DJ Delorie Date: Thu, 12 Sep 2013 17:06:38 +0000 (-0400) Subject: cfgexpand.c (expand_debug_expr): Avoid sign-extending SImode to PSImode. X-Git-Tag: upstream/12.2.0~67919 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8369f38a6f3f797952452dc25cd148909e049ee6;p=platform%2Fupstream%2Fgcc.git cfgexpand.c (expand_debug_expr): Avoid sign-extending SImode to PSImode. * cfgexpand.c (expand_debug_expr): Avoid sign-extending SImode to PSImode. From-SVN: r202534 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0acde62..de4bb3d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2013-09-12 DJ Delorie + + * cfgexpand.c (expand_debug_expr): Avoid sign-extending SImode to + PSImode. + 2013-09-12 Martin Jambor PR ipa/58389 diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index 4f10361..88e48c2 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -3154,7 +3154,12 @@ expand_debug_expr (tree exp) && GET_MODE (op0) != VOIDmode && GET_MODE (op1) != VOIDmode && GET_MODE (op0) != GET_MODE (op1)) { - if (GET_MODE_BITSIZE (GET_MODE (op0)) < GET_MODE_BITSIZE (GET_MODE (op1))) + if (GET_MODE_BITSIZE (GET_MODE (op0)) < GET_MODE_BITSIZE (GET_MODE (op1)) + /* If OP0 is a partial mode, then we must truncate, even if it has + the same bitsize as OP1 as GCC's representation of partial modes + is opaque. */ + || (GET_MODE_CLASS (GET_MODE (op0)) == MODE_PARTIAL_INT + && GET_MODE_BITSIZE (GET_MODE (op0)) == GET_MODE_BITSIZE (GET_MODE (op1)))) op1 = simplify_gen_unary (TRUNCATE, GET_MODE (op0), op1, GET_MODE (op1)); else