diff options
author | liuhongt <hongtao.liu@intel.com> | 2023-05-31 11:20:46 +0800 |
---|---|---|
committer | liuhongt <hongtao.liu@intel.com> | 2023-06-21 10:16:07 +0800 |
commit | 6f19cf7526168f840fd22f6af3f0cb67efb90dc8 (patch) | |
tree | 505db8da7b973237f92551ac2454293afbc9a916 /gcc/testsuite | |
parent | bfc6d29f8b9468e939252f50ea9418a31fb7eca2 (diff) | |
download | gcc-6f19cf7526168f840fd22f6af3f0cb67efb90dc8.zip gcc-6f19cf7526168f840fd22f6af3f0cb67efb90dc8.tar.gz gcc-6f19cf7526168f840fd22f6af3f0cb67efb90dc8.tar.bz2 |
Use intermiediate integer type for float_expr/fix_trunc_expr when direct optab is not existed.
We have already use intermidate type in case WIDEN, but not for NONE,
this patch extended that.
gcc/ChangeLog:
PR target/110018
* tree-vect-stmts.cc (vectorizable_conversion): Use
intermiediate integer type for float_expr/fix_trunc_expr when
direct optab is not existed.
gcc/testsuite/ChangeLog:
* gcc.target/i386/pr110018-1.c: New test.
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr110018-1.c | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr110018-1.c b/gcc/testsuite/gcc.target/i386/pr110018-1.c new file mode 100644 index 0000000..b1baffd --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr110018-1.c @@ -0,0 +1,94 @@ +/* { dg-do compile } */ +/* { dg-options "-mavx512fp16 -mavx512vl -O2 -mavx512dq" } */ +/* { dg-final { scan-assembler-times {(?n)vcvttp[dsh]2[dqw]} 5 } } */ +/* { dg-final { scan-assembler-times {(?n)vcvt[dqw]*2p[dsh]} 5 } } */ + +void +foo (double* __restrict a, char* b) +{ + a[0] = b[0]; + a[1] = b[1]; +} + +void +foo1 (float* __restrict a, char* b) +{ + a[0] = b[0]; + a[1] = b[1]; + a[2] = b[2]; + a[3] = b[3]; +} + +void +foo2 (_Float16* __restrict a, char* b) +{ + a[0] = b[0]; + a[1] = b[1]; + a[2] = b[2]; + a[3] = b[3]; + a[4] = b[4]; + a[5] = b[5]; + a[6] = b[6]; + a[7] = b[7]; +} + +void +foo3 (double* __restrict a, short* b) +{ + a[0] = b[0]; + a[1] = b[1]; +} + +void +foo4 (float* __restrict a, char* b) +{ + a[0] = b[0]; + a[1] = b[1]; + a[2] = b[2]; + a[3] = b[3]; +} + +void +foo5 (double* __restrict b, char* a) +{ + a[0] = b[0]; + a[1] = b[1]; +} + +void +foo6 (float* __restrict b, char* a) +{ + a[0] = b[0]; + a[1] = b[1]; + a[2] = b[2]; + a[3] = b[3]; +} + +void +foo7 (_Float16* __restrict b, char* a) +{ + a[0] = b[0]; + a[1] = b[1]; + a[2] = b[2]; + a[3] = b[3]; + a[4] = b[4]; + a[5] = b[5]; + a[6] = b[6]; + a[7] = b[7]; +} + +void +foo8 (double* __restrict b, short* a) +{ + a[0] = b[0]; + a[1] = b[1]; +} + +void +foo9 (float* __restrict b, char* a) +{ + a[0] = b[0]; + a[1] = b[1]; + a[2] = b[2]; + a[3] = b[3]; +} |