diff options
author | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-09-12 19:06:05 +0000 |
---|---|---|
committer | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-09-12 19:06:05 +0000 |
commit | 8403001eb9f3b54aa6c375d98ceb8d30c5cd0cf9 (patch) | |
tree | dd696bf575c93971cc1dc5e9a20aea0864816d0a /gcc/ifcvt.c | |
parent | d9bce34f52360a4455e4ef3796daa5dc5c65ff61 (diff) | |
download | gcc-8403001eb9f3b54aa6c375d98ceb8d30c5cd0cf9.tar.gz |
Fix ia64-linux glibc intl/loadmsgcat.c miscompilation.
* ifcvt.c (noce_process_if_block): If A and B are the same, and no
else block, and X has side-effects, then fail.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36373 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r-- | gcc/ifcvt.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 901bd42b483..3ca0e6ccc65 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -1247,6 +1247,11 @@ noce_process_if_block (test_bb, then_bb, else_bb, join_bb) reorder_insns (insn_b, insn_b, PREV_INSN (if_info.cond_earliest)); insn_b = NULL_RTX; } + /* If we have "x = b; if (...) x = a;", and x has side-effects, then + x must be executed twice. */ + else if (insn_b && side_effects_p (orig_x)) + return FALSE; + x = orig_x; goto success; } |