aboutsummaryrefslogtreecommitdiff
path: root/gcc/ifcvt.c
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2008-03-04 14:57:27 +0100
committerUros Bizjak <uros@gcc.gnu.org>2008-03-04 14:57:27 +0100
commit5ce0e197751a14209bb632fb8b5ed6375376de38 (patch)
tree2b0fdb445e4a37df145f47915302d260202d1164 /gcc/ifcvt.c
parente0898f4cedf01f4f96da684d329e35805a76d32d (diff)
downloadgcc-5ce0e197751a14209bb632fb8b5ed6375376de38.zip
gcc-5ce0e197751a14209bb632fb8b5ed6375376de38.tar.gz
gcc-5ce0e197751a14209bb632fb8b5ed6375376de38.tar.bz2
re PR middle-end/35456 (Different results for inlined vs. non-inlined function)
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. From-SVN: r132863
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r--gcc/ifcvt.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 4fd98d0..cab4fbd 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. */