diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2010-09-13 00:49:27 +0000 |
---|---|---|
committer | Hans-Peter Nilsson <hp@gcc.gnu.org> | 2010-09-13 00:49:27 +0000 |
commit | ddf68ab9b599b0aa79c118e24fca70ff7663d0eb (patch) | |
tree | 34098daa96824d3e738563cea60cf44c47b0adb0 /gcc | |
parent | a079d4d212c59191fbd32e911f8917156e7505f7 (diff) | |
download | gcc-ddf68ab9b599b0aa79c118e24fca70ff7663d0eb.zip gcc-ddf68ab9b599b0aa79c118e24fca70ff7663d0eb.tar.gz gcc-ddf68ab9b599b0aa79c118e24fca70ff7663d0eb.tar.bz2 |
re PR rtl-optimization/41087 (cris-elf gfortran.dg/zero_sized_3.f90 -O3 -funroll-loops execution)
PR rtl-optimization/41087
* ifcvt.c (noce_get_condition): Don't allow conditions with
side-effects.
From-SVN: r164240
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/ifcvt.c | 11 |
2 files changed, 15 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index db8a1fd..0af0353 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2010-09-13 Hans-Peter Nilsson <hp@axis.com> + + PR rtl-optimization/41087 + * ifcvt.c (noce_get_condition): Don't allow conditions with + side-effects. + 2010-09-12 Anatoly Sokolov <aesok@post.ru> * config/frv/frv.h (REGISTER_MOVE_COST, MEMORY_MOVE_COST): Remove. diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 9ac4b13..9aff583 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -2201,8 +2201,15 @@ noce_get_condition (rtx jump, rtx *earliest, bool then_else_reversed) /* Otherwise, fall back on canonicalize_condition to do the dirty work of manipulating MODE_CC values and COMPARE rtx codes. */ - return canonicalize_condition (jump, cond, reverse, earliest, - NULL_RTX, false, true); + tmp = canonicalize_condition (jump, cond, reverse, earliest, + NULL_RTX, false, true); + + /* We don't handle side-effects in the condition, like handling + REG_INC notes and making sure no duplicate conditions are emitted. */ + if (tmp != NULL_RTX && side_effects_p (tmp)) + return NULL_RTX; + + return tmp; } /* Return true if OP is ok for if-then-else processing. */ |