diff options
author | Kewen Lin <linkw@linux.ibm.com> | 2023-03-26 21:42:23 -0500 |
---|---|---|
committer | Kewen Lin <linkw@linux.ibm.com> | 2023-03-26 21:42:23 -0500 |
commit | f33fc0775706e4db80d584c477608e28f4da0a6f (patch) | |
tree | ba46658dc9c57c168bc1f4103a04bbce494b63e7 /gcc/range-op-float.cc | |
parent | 50a36a9541526708881f2ac0c4f180506bcf80bb (diff) | |
download | gcc-f33fc0775706e4db80d584c477608e28f4da0a6f.zip gcc-f33fc0775706e4db80d584c477608e28f4da0a6f.tar.gz gcc-f33fc0775706e4db80d584c477608e28f4da0a6f.tar.bz2 |
rs6000: Ensure vec_sld shift count in allowable range [PR109082]
As PR109082 shows, some uses of vec_sld in emmintrin.h don't
strictly guarantee the given shift count is in the range
0-15 (inclusive). This patch is to make the argument
range constraint honored for those uses.
PR target/109082
gcc/ChangeLog:
* config/rs6000/emmintrin.h (_mm_bslli_si128): Check __N is not less
than zero when calling vec_sld.
(_mm_bsrli_si128): Return __A if __N is zero, check __N is bigger than
zero when calling vec_sld.
(_mm_slli_si128): Return __A if _imm5 is zero, check _imm5 is bigger
than zero when calling vec_sld.
gcc/testsuite/ChangeLog:
* gcc.target/powerpc/pr109082.c: New test.
Diffstat (limited to 'gcc/range-op-float.cc')
0 files changed, 0 insertions, 0 deletions