diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-31 23:48:36 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-12-31 23:48:36 +0000 |
commit | d733203b93e172b13a834048793327ecebb350ef (patch) | |
tree | 0c9460069081404cd95d3072539a8bbe5911d6a2 /gcc/cse.c | |
parent | 0b7cc9c601629ff70a732cc3b5867e50f1d421aa (diff) | |
download | ppe42-gcc-d733203b93e172b13a834048793327ecebb350ef.tar.gz ppe42-gcc-d733203b93e172b13a834048793327ecebb350ef.zip |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206267 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/cse.c b/gcc/cse.c index 0e28f487296..a58e7e9e8e9 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -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)); |