diff options
author | Kyrylo Tkachov <ktkachov@gcc.gnu.org> | 2015-11-24 09:31:57 +0000 |
---|---|---|
committer | Kyrylo Tkachov <ktkachov@gcc.gnu.org> | 2015-11-24 09:31:57 +0000 |
commit | 8632824e9c117077ef95d907ff51553b584609ba (patch) | |
tree | d047e8d586b542f770412c7b9ce466021f56bf60 /gcc/ree.c | |
parent | 4404c2826c45ffb749e868b011c480a9d279f8e7 (diff) |
[RTL-ree] PR rtl-optimization/68194: Restrict copy instruction in presence of conditional moves
PR rtl-optimization/68194
PR rtl-optimization/68328
PR rtl-optimization/68185
* ree.c (combine_reaching_defs): Reject copy_needed case if
copies_list is not empty.
* gcc.c-torture/execute/pr68185.c: New test.
* gcc.c-torture/execute/pr68328.c: Likewise.
From-SVN: r230795
Diffstat (limited to 'gcc/ree.c')
-rw-r--r-- | gcc/ree.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/ree.c b/gcc/ree.c index f3b79e0886d..6cfc477470e 100644 --- a/gcc/ree.c +++ b/gcc/ree.c @@ -760,6 +760,12 @@ combine_reaching_defs (ext_cand *cand, const_rtx set_pat, ext_state *state) if (state->defs_list.length () != 1) return false; + /* We don't have the structure described above if there are + conditional moves in between the def and the candidate, + and we will not handle them correctly. See PR68194. */ + if (state->copies_list.length () > 0) + return false; + /* We require the candidate not already be modified. It may, for example have been changed from a (sign_extend (reg)) into (zero_extend (sign_extend (reg))). |