From 934861488090cd5fa80845d9b07c6497e5d7621a Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Wed, 14 Jun 2017 10:40:34 +0000 Subject: simplify-rtx.c (simplify_binary_operation_1): Do not simplify a division of 0 if non-call exceptions are enabled. * simplify-rtx.c (simplify_binary_operation_1) : Do not simplify a division of 0 if non-call exceptions are enabled. From-SVN: r249188 --- gcc/simplify-rtx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gcc/simplify-rtx.c') diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c index 7cab26a..e8af7f3 100644 --- a/gcc/simplify-rtx.c +++ b/gcc/simplify-rtx.c @@ -3194,7 +3194,8 @@ simplify_binary_operation_1 (enum rtx_code code, machine_mode mode, case UDIV: /* 0/x is 0 (or x&0 if x has side-effects). */ - if (trueop0 == CONST0_RTX (mode)) + if (trueop0 == CONST0_RTX (mode) + && !cfun->can_throw_non_call_exceptions) { if (side_effects_p (op1)) return simplify_gen_binary (AND, mode, op1, trueop0); -- cgit v1.1