aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2022-02-12 10:53:49 +0100
committerUros Bizjak <ubizjak@gmail.com>2022-02-12 10:55:29 +0100
commitedadc7e0510b703d9727cf5ff68d55d84bb95def (patch)
tree2c72a95af491a90e628aaaadfefcd122ff256f5a /gcc/config
parente8d68f0a456e00437587461d9645852272fb2322 (diff)
downloadgcc-edadc7e0510b703d9727cf5ff68d55d84bb95def.zip
gcc-edadc7e0510b703d9727cf5ff68d55d84bb95def.tar.gz
gcc-edadc7e0510b703d9727cf5ff68d55d84bb95def.tar.bz2
i386: Skip decimal float vector modes in type_natural_mode [PR79754]
2022-02-12 Uroš Bizjak <ubizjak@gmail.com> gcc/ChangeLog: PR target/79754 * config/i386/i386.cc (type_natural_mode): Skip decimal float vector modes. gcc/testsuite/ChangeLog: PR target/79754 * gcc.target/i386/pr79754.c: New test.
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/i386/i386.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/config/i386/i386.cc b/gcc/config/i386/i386.cc
index 6b97a2b..cf246e7 100644
--- a/gcc/config/i386/i386.cc
+++ b/gcc/config/i386/i386.cc
@@ -1876,10 +1876,14 @@ type_natural_mode (const_tree type, const CUMULATIVE_ARGS *cum,
{
machine_mode innermode = TYPE_MODE (TREE_TYPE (type));
- /* There are no XFmode vector modes. */
+ /* There are no XFmode vector modes ... */
if (innermode == XFmode)
return mode;
+ /* ... and no decimal float vector modes. */
+ if (DECIMAL_FLOAT_MODE_P (innermode))
+ return mode;
+
if (TREE_CODE (TREE_TYPE (type)) == REAL_TYPE)
mode = MIN_MODE_VECTOR_FLOAT;
else