diff options
author | Segher Boessenkool <segher@kernel.crashing.org> | 2016-07-29 14:34:21 +0200 |
---|---|---|
committer | Georg-Johann Lay <gjl@gcc.gnu.org> | 2016-07-29 12:34:21 +0000 |
commit | cc80b225c509c45dadbeccdb154985677e1ae3a3 (patch) | |
tree | 50867daa107ab04b9f7d34e4db17a3c2a3d4d3d8 /gcc/combine.c | |
parent | 673a107a4003834ec3d6e8f413bda3c13b6062e7 (diff) | |
download | gcc-cc80b225c509c45dadbeccdb154985677e1ae3a3.zip gcc-cc80b225c509c45dadbeccdb154985677e1ae3a3.tar.gz gcc-cc80b225c509c45dadbeccdb154985677e1ae3a3.tar.bz2 |
re PR rtl-optimization/71976 (insn-combiner deletes a live 64-bit shift)
gcc/
PR rtl-optimization/71976
* combine.c (get_last_value): Return 0 if the argument for which
the function is called has a wider mode than the recorded value.
Co-Authored-By: Georg-Johann Lay <avr@gjlay.de>
From-SVN: r238863
Diffstat (limited to 'gcc/combine.c')
-rw-r--r-- | gcc/combine.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 93c1710..b687867 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -13210,6 +13210,12 @@ get_last_value (const_rtx x) && DF_INSN_LUID (rsp->last_set) >= subst_low_luid) return 0; + /* If fewer bits were set than what we are asked for now, we cannot use + the value. */ + if (GET_MODE_PRECISION (rsp->last_set_mode) + < GET_MODE_PRECISION (GET_MODE (x))) + return 0; + /* If the value has all its registers valid, return it. */ if (get_last_value_validate (&value, rsp->last_set, rsp->last_set_label, 0)) return value; |