diff options
author | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-04 13:57:27 +0000 |
---|---|---|
committer | uros <uros@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-03-04 13:57:27 +0000 |
commit | 01e93ec4e055b2ae6cfe76ad9685a2eca155f99b (patch) | |
tree | 2b0fdb445e4a37df145f47915302d260202d1164 /gcc/ifcvt.c | |
parent | ba587cde841db751f6f9c307798b538c761f54b6 (diff) | |
download | gcc-01e93ec4e055b2ae6cfe76ad9685a2eca155f99b.tar.gz |
PR middle-end/35456
* fold-const.c (fold_cond_expr_with_comparison): Prevent
transformations for modes that have signed zeros.
* ifcvt.c (noce_try_abs): Ditto.
testsuite/ChangeLog:
PR middle-end/35456
* gcc.c-torture/execute/pr35456.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132863 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r-- | gcc/ifcvt.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 4fd98d010d3..cab4fbdf6b1 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -1738,6 +1738,10 @@ noce_try_abs (struct noce_if_info *if_info) rtx cond, earliest, target, seq, a, b, c; int negate; + /* Reject modes with signed zeros. */ + if (HONOR_SIGNED_ZEROS (GET_MODE (if_info->x))) + return FALSE; + /* Recognize A and B as constituting an ABS or NABS. The canonical form is a branch around the negation, taken when the object is the first operand of a comparison against 0 that evaluates to true. */ |