diff options
| author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2016-08-04 13:20:57 +0000 |
|---|---|---|
| committer | Bernd Edlinger <edlinger@gcc.gnu.org> | 2016-08-04 13:20:57 +0000 |
| commit | 086ad22e0e7bbff4329d0dcbdc1b4be04ba4a868 (patch) | |
| tree | c1189eb5f7c1e72590aee39e3b908fd9838a97a5 /gcc/cse.c | |
| parent | 9a8e528cf1e5aa1a7e7fa09716a3b5b87b56dc93 (diff) | |
| download | gcc-086ad22e0e7bbff4329d0dcbdc1b4be04ba4a868.zip gcc-086ad22e0e7bbff4329d0dcbdc1b4be04ba4a868.tar.gz gcc-086ad22e0e7bbff4329d0dcbdc1b4be04ba4a868.tar.bz2 | |
re PR target/70903 (wrong code with bfi @ aarch64 with -Os)
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.
From-SVN: r239122
Diffstat (limited to 'gcc/cse.c')
| -rw-r--r-- | gcc/cse.c | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -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)); |
