diff options
author | Jakub Jelinek <jakub@redhat.com> | 2014-01-01 00:48:36 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2014-01-01 00:48:36 +0100 |
commit | dfebbdc61fc2aff2380313c5e8d7281b80d9b76c (patch) | |
tree | 0c9460069081404cd95d3072539a8bbe5911d6a2 /gcc/cse.c | |
parent | 075691af6b69963626c2e242661f4d39131d6b25 (diff) | |
download | gcc-dfebbdc61fc2aff2380313c5e8d7281b80d9b76c.zip gcc-dfebbdc61fc2aff2380313c5e8d7281b80d9b76c.tar.gz gcc-dfebbdc61fc2aff2380313c5e8d7281b80d9b76c.tar.bz2 |
re PR rtl-optimization/59647 (ICE in simplify_const_unary_operation, at simplify-rtx.c:1597)
PR rtl-optimization/59647
* cse.c (cse_process_notes_1): Don't substitute negative VOIDmode
new_rtx into UNSIGNED_FLOAT rtxes.
* g++.dg/opt/pr59647.C: New test.
From-SVN: r206267
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -6090,6 +6090,18 @@ cse_process_notes_1 (rtx x, rtx object, bool *changed) return x; } + case UNSIGNED_FLOAT: + { + rtx new_rtx = cse_process_notes (XEXP (x, 0), object, changed); + /* We don't substitute negative VOIDmode constants into these rtx, + since they would impede folding. */ + if (GET_MODE (new_rtx) != VOIDmode + || (CONST_INT_P (new_rtx) && INTVAL (new_rtx) >= 0) + || (CONST_DOUBLE_P (new_rtx) && CONST_DOUBLE_HIGH (new_rtx) >= 0)) + validate_change (object, &XEXP (x, 0), new_rtx, 0); + return x; + } + case REG: i = REG_QTY (REGNO (x)); |