aboutsummaryrefslogtreecommitdiff
path: root/gcc/optabs.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2017-07-16 22:03:54 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2017-07-16 22:03:54 +0000
commit38f638cae20c53258854054bfc09f489c01ffe94 (patch)
treec49cf2dcd3b1df898c4e6bcf2bd73d2babd4798c /gcc/optabs.c
parent1234ee19c9a7b175c154f987d3089d669d17501a (diff)
downloadgcc-38f638cae20c53258854054bfc09f489c01ffe94.zip
gcc-38f638cae20c53258854054bfc09f489c01ffe94.tar.gz
gcc-38f638cae20c53258854054bfc09f489c01ffe94.tar.bz2
re PR rtl-optimization/81424 (internal error on GPRbuild with -O2)
PR rtl-optimization/81424 * optabs.c (prepare_cmp_insn): Use copy_to_reg instead of force_reg to remove potential trapping from operands if -fnon-call-exceptions. From-SVN: r250246
Diffstat (limited to 'gcc/optabs.c')
-rw-r--r--gcc/optabs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/optabs.c b/gcc/optabs.c
index 3905132..9258e5f 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -3846,9 +3846,9 @@ prepare_cmp_insn (rtx x, rtx y, enum rtx_code comparison, rtx size,
if (cfun->can_throw_non_call_exceptions)
{
if (may_trap_p (x))
- x = force_reg (mode, x);
+ x = copy_to_reg (x);
if (may_trap_p (y))
- y = force_reg (mode, y);
+ y = copy_to_reg (y);
}
if (GET_MODE_CLASS (mode) == MODE_CC)