diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-27 16:33:39 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-01-27 16:33:39 +0000 |
commit | a5ce6046d76b19e8faaed24586034395401e2170 (patch) | |
tree | 26d81ac85799658a9f470a135d72f105684f54b0 /gcc/expmed.h | |
parent | 15f3a2d243adf2b978e8868f3fdba5dc596ae74c (diff) | |
download | gcc-a5ce6046d76b19e8faaed24586034395401e2170.tar.gz |
PR bootstrap/59934
* expmed.h (expmed_mode_index): Rework so that analysis and optimziers
know when the MODE_PARTIAL_INT and MODE_VECTOR_INT cases can never be
reached.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@207137 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expmed.h')
-rw-r--r-- | gcc/expmed.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/expmed.h b/gcc/expmed.h index 9681e41fbde..4d01d1f0ec8 100644 --- a/gcc/expmed.h +++ b/gcc/expmed.h @@ -221,12 +221,21 @@ expmed_mode_index (enum machine_mode mode) case MODE_INT: return mode - MIN_MODE_INT; case MODE_PARTIAL_INT: - return mode - MIN_MODE_PARTIAL_INT + NUM_MODE_INT; + /* If there are no partial integer modes, help the compiler + to figure out this will never happen. See PR59934. */ + if (MIN_MODE_PARTIAL_INT != VOIDmode) + return mode - MIN_MODE_PARTIAL_INT + NUM_MODE_INT; + break; case MODE_VECTOR_INT: - return mode - MIN_MODE_VECTOR_INT + NUM_MODE_IP_INT; + /* If there are no vector integer modes, help the compiler + to figure out this will never happen. See PR59934. */ + if (MIN_MODE_VECTOR_INT != VOIDmode) + return mode - MIN_MODE_VECTOR_INT + NUM_MODE_IP_INT; + break; default: - gcc_unreachable (); + break; } + gcc_unreachable (); } /* Return a pointer to a boolean contained in EOC indicating whether |