diff options
author | Jakub Jelinek <jakub@gcc.gnu.org> | 2013-03-06 18:18:46 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2013-03-06 18:18:46 +0100 |
commit | a72d87803e238ec0302aede5ac0267a02c42085e (patch) | |
tree | ed41f33979c0edc53fadd53f349690eabb055f20 /gcc/expr.c | |
parent | 28937f1196166ef33c303ff09f0d7f4936faec81 (diff) | |
download | gcc-a72d87803e238ec0302aede5ac0267a02c42085e.zip gcc-a72d87803e238ec0302aede5ac0267a02c42085e.tar.gz gcc-a72d87803e238ec0302aede5ac0267a02c42085e.tar.bz2 |
re PR middle-end/56548 (ICE in emit_move_insn, at expr.c:3486 with -march=pentium{pro,2,3} -O3)
PR middle-end/56548
* expr.c (expand_cond_expr_using_cmove): When expanding cmove in
promoted mode, convert the result back to the original mode.
* gcc.dg/pr56548.c: New test.
From-SVN: r196498
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -7884,6 +7884,7 @@ expand_cond_expr_using_cmove (tree treeop0 ATTRIBUTE_UNUSED, tree type = TREE_TYPE (treeop1); int unsignedp = TYPE_UNSIGNED (type); enum machine_mode mode = TYPE_MODE (type); + enum machine_mode orig_mode = mode; /* If we cannot do a conditional move on the mode, try doing it with the promoted mode. */ @@ -7949,7 +7950,7 @@ expand_cond_expr_using_cmove (tree treeop0 ATTRIBUTE_UNUSED, rtx seq = get_insns (); end_sequence (); emit_insn (seq); - return temp; + return convert_modes (orig_mode, mode, temp, 0); } /* Otherwise discard the sequence and fall back to code with |