diff options
author | Pan Li <pan2.li@intel.com> | 2023-10-30 15:29:21 +0800 |
---|---|---|
committer | Pan Li <pan2.li@intel.com> | 2023-11-02 08:53:29 +0800 |
commit | 88aca917eb705b16ec6c045ae7d499b1602a85e8 (patch) | |
tree | 19a23eba30cca4dd18e40d6ab8024c0d2f953b6b /libcpp/include/cpplib.h | |
parent | 1a0af6e5a99cd895a663f0221c25321ae802413f (diff) | |
download | gcc-88aca917eb705b16ec6c045ae7d499b1602a85e8.zip gcc-88aca917eb705b16ec6c045ae7d499b1602a85e8.tar.gz gcc-88aca917eb705b16ec6c045ae7d499b1602a85e8.tar.bz2 |
VECT: Refine the type size restriction of call vectorizer
Update in v4:
* Append the check to vectorizable_internal_function.
Update in v3:
* Add func to predicate type size is legal or not for vectorizer call.
Update in v2:
* Fix one ICE of type assertion.
* Adjust some test cases for aarch64 sve and riscv vector.
Original log:
The vectoriable_call has one restriction of the size of data type.
Aka DF to DI is allowed but SF to DI isn't. You may see below message
when try to vectorize function call like lrintf.
void
test_lrintf (long *out, float *in, unsigned count)
{
for (unsigned i = 0; i < count; i++)
out[i] = __builtin_lrintf (in[i]);
}
lrintf.c:5:26: missed: couldn't vectorize loop
lrintf.c:5:26: missed: not vectorized: unsupported data-type
Then the standard name pattern like lrintmn2 cannot work for different
data type size like SF => DI. This patch would like to refine this data
type size check and unblock the standard name like lrintmn2 on conditions.
The type size of vectype_out need to be exactly the same as the type
size of vectype_in when the vectype_out size isn't participating in
the optab selection. While there is no such restriction when the
vectype_out is somehow a part of the optab query.
The below test are passed for this patch.
* The risc-v regression tests.
* Ensure the lrintf standard name in risc-v.
The below test are ongoing.
* The x86 bootstrap and regression test.
* The aarch64 regression test.
gcc/ChangeLog:
* tree-vect-stmts.cc (vectorizable_internal_function): Add type
size check for vectype_out doesn't participating for optab query.
(vectorizable_call): Remove the type size check.
Signed-off-by: Pan Li <pan2.li@intel.com>
Diffstat (limited to 'libcpp/include/cpplib.h')
0 files changed, 0 insertions, 0 deletions