diff options
author | edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-08-04 13:20:57 +0000 |
---|---|---|
committer | edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4> | 2016-08-04 13:20:57 +0000 |
commit | e8dedc4a7e375d90f38460b966a4cf185f2abc60 (patch) | |
tree | c1189eb5f7c1e72590aee39e3b908fd9838a97a5 /gcc/cse.c | |
parent | ad164f750a2c1742e1ddd99d1b1fdc8f89b27070 (diff) | |
download | gcc-e8dedc4a7e375d90f38460b966a4cf185f2abc60.tar.gz |
2016-08-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR rtl-optimization/70903
* cse.c (cse_insn): If DEST is a paradoxical SUBREG, don't record DEST.
testsuite:
2016-08-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR rtl-optimization/70903
* gcc.c-torture/execute/pr70903.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@239122 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/gcc/cse.c b/gcc/cse.c index 61d2d7e3c3f..0bfd7ff1669 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -5898,15 +5898,7 @@ cse_insn (rtx_insn *insn) || GET_MODE (dest) == BLKmode /* If we didn't put a REG_EQUAL value or a source into the hash table, there is no point is recording DEST. */ - || sets[i].src_elt == 0 - /* If DEST is a paradoxical SUBREG and SRC is a ZERO_EXTEND - or SIGN_EXTEND, don't record DEST since it can cause - some tracking to be wrong. - - ??? Think about this more later. */ - || (paradoxical_subreg_p (dest) - && (GET_CODE (sets[i].src) == SIGN_EXTEND - || GET_CODE (sets[i].src) == ZERO_EXTEND))) + || sets[i].src_elt == 0) continue; /* STRICT_LOW_PART isn't part of the value BEING set, @@ -5925,6 +5917,11 @@ cse_insn (rtx_insn *insn) sets[i].dest_hash = HASH (dest, GET_MODE (dest)); } + /* If DEST is a paradoxical SUBREG, don't record DEST since the bits + outside the mode of GET_MODE (SUBREG_REG (dest)) are undefined. */ + if (paradoxical_subreg_p (dest)) + continue; + elt = insert (dest, sets[i].src_elt, sets[i].dest_hash, GET_MODE (dest)); |