diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2017-06-14 10:40:34 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2017-06-14 10:40:34 +0000 |
commit | 934861488090cd5fa80845d9b07c6497e5d7621a (patch) | |
tree | b00455bd7d290f11dce96406355422f2bca07827 /gcc | |
parent | 85c1b6d7c855fd1b76a385af2b7f2c56bf3b7f11 (diff) | |
download | gcc-934861488090cd5fa80845d9b07c6497e5d7621a.zip gcc-934861488090cd5fa80845d9b07c6497e5d7621a.tar.gz gcc-934861488090cd5fa80845d9b07c6497e5d7621a.tar.bz2 |
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) <UDIV>: Do not simplify
a division of 0 if non-call exceptions are enabled.
From-SVN: r249188
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/simplify-rtx.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8205b0e..c6e6572 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2017-06-14 Eric Botcazou <ebotcazou@adacore.com> + + * simplify-rtx.c (simplify_binary_operation_1) <UDIV>: Do not simplify + a division of 0 if non-call exceptions are enabled. + 2017-06-14 Andrew Pinski <apinski@cavium.com> Naveen H.S <Naveen.Hurugalawadi@cavium.com> 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); |