diff options
author | Steve Ellcey <sellcey@mips.com> | 2012-11-15 17:27:44 +0000 |
---|---|---|
committer | Steve Ellcey <sje@gcc.gnu.org> | 2012-11-15 17:27:44 +0000 |
commit | 59bdc31c02bd400b727ebd4b2d6e57bd558dab37 (patch) | |
tree | b5c0532be30bba686ce4d321fd0e2ca0f2bf152a /gcc/expr.c | |
parent | 7ee2eb82776dc8b2a54fa8a643f70d6f0caccddb (diff) | |
download | gcc-59bdc31c02bd400b727ebd4b2d6e57bd558dab37.zip gcc-59bdc31c02bd400b727ebd4b2d6e57bd558dab37.tar.gz gcc-59bdc31c02bd400b727ebd4b2d6e57bd558dab37.tar.bz2 |
expr.c (expand_cond_expr_using_cmove): Use promoted mode for temp.
2012-11-15 Steve Ellcey <sellcey@mips.com>
* expr.c (expand_cond_expr_using_cmove): Use promoted mode for temp.
From-SVN: r193539
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -7840,15 +7840,17 @@ expand_cond_expr_using_cmove (tree treeop0 ATTRIBUTE_UNUSED, int unsignedp = TYPE_UNSIGNED (type); enum machine_mode mode = TYPE_MODE (type); - temp = assign_temp (type, 0, 1); - /* If we cannot do a conditional move on the mode, try doing it with the promoted mode. */ if (!can_conditionally_move_p (mode)) - mode = promote_mode (type, mode, &unsignedp); - - if (!can_conditionally_move_p (mode)) - return NULL_RTX; + { + mode = promote_mode (type, mode, &unsignedp); + if (!can_conditionally_move_p (mode)) + return NULL_RTX; + temp = assign_temp (type, 0, 0); /* Use promoted mode for temp. */ + } + else + temp = assign_temp (type, 0, 1); start_sequence (); expand_operands (treeop1, treeop2, |